2rrtuiiu

来源:互联网 发布:matlab 关联矩阵代码 编辑:程序博客网 时间:2024/05/24 06:02
main() { int i,j,temp; int a[10]; for(i=0;i<10;i++) scanf ("%d,",&a[i]); for(j=0;j<=9;j++) { for (i=0;i<10-j;i++) if (a[i]>a[i+1]) { temp=a[i]; a[i]=a[i+1]; a[i+1]=temp;} } for(i=1;i<11;i++) printf("%5d,",a[i] ); printf("\n"); }
0 0