#include<bits/stdc++.h>
using namespace std;
int main()
{
vector<int> a ={1,6,3,8,4};
// Sort array in Descending order
// sort(a,a+5,greater<int>());
// Sort array in Ascending order
// sort(a,a+5);
// Sort Vector Ascending order
// sort(a.being(),a.end());
// sort Vector in Descending order
// sort(a.begin(),a.end(),greater<int>());
// for (int i = 0; i <5; i++)
// {
// cout<<a[i]<<" ";
// }
for(auto element:a){
cout<<element<<" ";
}
return 0;
}
Comments
Post a Comment