fork download
  1. #include<algorithm>
  2. #include <iostream>
  3. using namespace std;
  4.  
  5. int main() {
  6. // your code goes here
  7. int n=10;
  8. int arr[]={1,4,6,2,7,9,3,5,8,0};
  9. sort(arr,arr+n);
  10. for(int i=0;i<n;i++)
  11. printf("%d ",arr[i]);
  12. return 0;
  13. }
Success #stdin #stdout 0s 3468KB
stdin
Standard input is empty
stdout
0 1 2 3 4 5 6 7 8 9