float sum[10] ;
float fox=0 ;
printf(" no.2 \n在数组中输入10个数字,并按从大到小的顺序排序 : \n");
for(int a=0;a<10;a++){
printf("第 %d 个数字 : ",a+1);
scanf("%f",&sum[a]);
}
for(int x=0;x<10;x++){
for(int y=1;y<10;y++){
if(x<=y){
if(sum[x]<sum[y]){
fox=sum[x];
sum[x]=sum[y];
sum[y]=fox;
}
}
}
}
for(int b=0;b<10;b++){
printf("%.2f ",sum[b]);
}