#27886: CPP想用sort就用吧,我覺得只要能打出來就行


11030067@mail.hpsh.tp.edu.tw (和平110級鄧雨珊)


#include <iostream>
#include <algorithm>
using namespace std;

int age[2000000];
int main(){
ios_base::sync_with_stdio(0);
cin.tie(0);
int n;
while (cin >> n){
if (n==0){
break;
}
for (int i=0; i<n; i++){
cin >> age[i];
}
sort(age, age+n);
for (int i=0; i<n; i++){
cout << age[i] <<" ";
}
cout <<endl;
}
}