1 #include "iostream" 2 #include "cstdio" 3 #include "cstring" 4 #include "algorithm" 5 using namespace std; 6 int ans[110], n; 7 8 int main() 9 { 10 int i; 11 scanf("%d", &n); 12 for(i = 1; i <= n; ++i) 13 scanf("%d", &ans[i]); 14 sort(ans + 1, ans + 1 + n); 15 printf("%d", ans[1]); 16 for(i = 2; i <= n; ++i) 17 printf(" %d", ans[i]); 18 printf(" "); 19 }