fork download
  1. #include<bits/stdc++.h>
  2. #include<iostream>
  3. using namespace std;
  4.  
  5. int main() {
  6. int a[5]={5,9,2,1,6};
  7. sort(a,a+5);
  8. int i=0;
  9. for(;i<5;i++)
  10. {
  11. cout<<a[i]<<" ";
  12. }
  13. return 0;
  14. }
Success #stdin #stdout 0s 15240KB
stdin
Standard input is empty
stdout
1 2 5 6 9