题解 | #排序#
排序
http://www.nowcoder.com/practice/508f66c6c93d4191ab25151066cb50ef
#include <iostream>
#include <cstdio>
#include <algorithm>
using namespace std;
const int MaxSize = 100 + 10;
int arr[MaxSize];
int main(){
int n = 0;
while(scanf("%d",&n)!=EOF){
for(int i = 0 ; i < n ; i++){
scanf("%d",&arr[i]);
}
sort(arr,arr+n);
for(int i = 0 ;i <n;i++){
printf("%d ",arr[i]);
}
cout << endl;
}
return 0;
}