int arr[100]={57,18,80,92,43,65,38,25,99,5};int a =0;for(int i =0; i <10; i++){_Bool flag =0;printf("--------------第 %2d 轮排序开始-------------------------\n", i +1);printf("开始数组:");for(int i =0; i <10; i++){printf(" %2d ", arr[i]);}printf("\n");for(int j =0; j <10- i; j++){printf("第 %2d 轮---第 %2d 次", i +1, j +1);if(arr[j]> arr[j+1]){
a = arr[j+1];
arr[j+1]= arr[j];
arr[j]= a;
flag =1;}for(int i =0; i <10; i++){printf(" %2d ", arr[i]);}printf("\n");}if(flag ==0)break;}