#include <iostream>
#include <algorithm>
using namespace std;
int a[5]={2,1,4,5,6};
int main()
{
sort(a,a+5);
for(int i=0;i<5;i++){
cout<<a[i]<<endl;
}
return 0;
}
Showing posts with label Sort. Show all posts
Showing posts with label Sort. Show all posts
Sunday, February 17, 2013
Sorting an array in C++
Subscribe to:
Posts (Atom)