《c语言折半插入、直接插入、起泡》由会员分享,可在线阅读,更多相关《c语言折半插入、直接插入、起泡(2页珍藏版)》请在金锄头文库上搜索。
折半插入排序 #include #define N 8 void main() int i,j,k; int low,high,m; int rN; printf(“please input the data:n“); for(j=1;jhigh+1;k-) rk=rk-1;rk=r0; for(j=1;j #define N 8 void main() int i,j; int rN; printf(“please input the data:n“); for(j=1;j void main() int i,j,temp; int a10; printf(“please input the data:n“); for(i=0;i temp=aj; /aj与 aj+1互换,temp 是中间变量 aj=aj+1; aj+1=temp; for(i=0;i10;i+) printf(“%d “,ai);