#include #define N 8void main(){int s[N],flag,temp;printf("输入8个整数:\n");for(int k=0;kprintf("s[%d]=",k);scanf("%d",&s[k]);}for(int i=0;iflag=0;for(int j=1;jif(s[j-1]>s[j]){temp=s[j];s[j]=s[j-1];s[j-1]=temp;flag=1;}if(!flag) break;}printf("\n排序后数组为:\n");for(int j=0;jprintf("s[%d]=%d\n",j,s[j]);}