#include<bits/stdc++.h> #define N 10 using namespace std; main() { int i, j, a[N], t, count=0; printf("ÇëΪÊý×éÔªËظ³³õÖµ£º \n"); for(i=0;i<N;i++) scanf("%d", &a[i]); for(i=1;i<=N-1;i++) for(j=0;j<N-i;j++) if(a[j]>a[j+1]) { t=a[j]; a[j]=a[j+1]; a[j+1]=t; } printf("¾¹ý½»»»ºóÊý×éÔªËØΪ£º\n"); for(i=0;i<N;i++) { count++; printf("%d", a[i]); if(count%5==0) printf("\n"); } printf("\n"); }
标签:std,daka,10,int,printf,main From: https://www.cnblogs.com/kongxiangzeng/p/17386137.html