You are viewing a single comment's thread. Return to all comments →
Here is my solution!
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> using namespace std; int main() { int num_ints, current_int; vector<int> ints; scanf("%d", &num_ints); for (int i = 0; i < num_ints; i++) { scanf("%d", ¤t_int); ints.push_back(current_int); } sort(ints.begin(), ints.end()); for (int i = 0; i < num_ints; i++) { printf("%d ", ints[i]); } return 0; }
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 →
Here is my solution!