You are viewing a single comment's thread. Return to all comments →
vector<int>vec; int n, nums; cin >> n; while (cin >> nums) vec.push_back(nums); sort(vec.begin(), vec.end()); for(int i=0; i<n; i++) cout << vec[i] << " ";
Seems like cookies are disabled on this browser, please enable them to open this website
Vector-Sort
You are viewing a single comment's thread. Return to all comments →