निम्नलिखित को आरोही क्रम में लिखिए| 685, 85, 4875, 695, 4998 *
Answers
Answered by
1
Explanation:
store the number in array and sort them.
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin>>n;
vector<int> v;
for(int i = 0 ; i <n; i++)
{ int x; cin>>x; v.push_back(x);
}
sort(v.begin(),v.end()); //stl function
for(int i = 0 ;i < n; i++)
cout<<v[i]<<" ";
}
Similar questions