freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

c語言數(shù)組練習(xí)題-文庫吧資料

2025-06-13 13:31本頁面
  

【正文】 {mid=(h+t)/2。 /*輸入要查找的數(shù)據(jù)*/ h=0。 scanf(%d,amp。a[i])。in。n)。 printf(please enter the number of data:(20) )。 int point。 else printf(The data is not in the array!)。 break。in。k)。 printf(please enter the number to be located:)。i++) scanf(%d,amp。 /*輸入原始數(shù)據(jù)的個數(shù)*/ for(i=0。 scanf(%d,amp。 clrscr()。(順序查找、折半查找)順序查找程序:include include void main( ){int a[20],i,n,k。i++) printf(%5d ,a[i])。for(i=0。 } else {printf(%d is not exist!\n,n)。i9。printf(output the array after earse:\n)。i++) a[i]=a[i+1]。} if(point!=1) /*n存在于數(shù)組中*/{for(i=point。i++) if(a[i]==n) {point=i。 /*保存應(yīng)該刪除的位置下標(biāo)*/ for(i=0。n)。 point printf(enter the number to be earsed: \n)。 clrscr()。 /* 輸出插入后的一維數(shù)組序列 */} 數(shù)組的元素的刪除:從數(shù)組中刪除指定的元素n。in+1。 printf(The array after insert is:\n)。 a[point]=k。ipoint。 break。in。 /*輸入要插入的數(shù)據(jù)*/523 56 65 78 895923 56 59 65 78 89i=2 224。 scanf(%d,amp。i++) printf(%5d,a[i])。 for(i=0。a[i])。in。n)。 printf(\nplease enter the number of data:(20) )。 int point。 /* 輸出排序后的一維數(shù)組序列 */} 假如數(shù)組a中的n個數(shù)是有序的,請將輸入的數(shù)k插入到a中,要求插入后依然保持有序。in。} }printf(\n output the sorted array\n)。a[j]=a[j+1]。j=k1。i) {k=i。 /* 輸出原始的一維數(shù)組序列 */ for(i=n1。in。 printf(\n output the original array\n)。i++) scanf(%d,amp。 for(i=0。 scanf(%d,amp。clrscr()。 /* 輸出排序后的一維數(shù)組序列 */}方法三:冒泡法include include void main( ){int i,j,k,n,a[100]。in。} } printf(\n output the sorted array\n)。a[i]=a[p]。j++) if(a[j]a[p]) p=j。 /*假定第i趟中最小數(shù)的位置是i*/ for(j=i+1。in1。i++) printf(%5d,a[i])。 for(i=0。a[i])。in。n)。 printf(enter the number:\n)。int temp。i++) printf(%5d,a[i])。 for(i=0。a[j]=temp。j++) if(a[i]a[j]) {temp=a[i]。i++)
點擊復(fù)制文檔內(nèi)容
教學(xué)教案相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1