#include <bits/stdc++.h> #define MAX 1000 using namespace std; int main() { int n; cin >> n; int data[MAX]; for (int i = 0; i < n; i++) cin >> data[i]; sort(data, data + n); for (int i = 0; i < n; i++) cout << data[i] << " "; }
#include <bits/stdc++.h> #define MAX 1000 using namespace std; int main() { int n; cin >> n; int data[MAX]; for (int i = 0; i < n; i++) cin >> data[i]; sort(data, data + n); for (int i = 0; i < n; i++) cout << data[i] << " "; }