1#include <iostream>
2#define MAX 100
3using namespace std;
4void main() {
5 int A[MAX], n, I, J, TEMP;
6 cin >> n;
7 for (I = 0; I < n; I++)
8 cin >> A[I];
9 for (I = 0; I < n - 1; I++)
10 for (J = 0; J < n - I - 1; J++)
11 if (A[J] > A[J + 1]) {
12 TEMP = A[J];
13 A[J] = A[J + 1];
14 A[J + 1] = TEMP;
15 }
16 for (I = 0; I < n; I++)
17 cout << A[I] << " ";
18}