當前位置:首頁 » 密碼管理 » 訪問釘子戶

訪問釘子戶

發布時間: 2023-07-05 02:13:52

㈠ C語言編寫程序,用插入法將10個數進行從大到小排序

#include<stdio.h>

void main()

{

int a[11],n,i,j;

printf("Please Input 10 Numbers: ");

for(i=1;i<=10;i++)

scanf("%d",&a[i]);

for(i=2;i<=10;i++)

{

a[0]=a[i];

for(j=i-1;a[j]>a[0];j--)

a[j+1]=a[j];

a[j+1]=a[0];

}

for(i=1;i<=10;i++)

printf("%d ",a[i]);

printf(" ");

}



熱點內容
vivoz6手機存儲設備在哪裡 發布:2025-03-13 08:08:36 瀏覽:53
emc存儲模擬器下載 發布:2025-03-13 08:06:54 瀏覽:756
粒子群演算法流程 發布:2025-03-13 08:04:44 瀏覽:290
pythonjsonkey 發布:2025-03-13 08:04:32 瀏覽:621
php刪除數組元素 發布:2025-03-13 07:58:08 瀏覽:827
怎麼編輯電腦按鍵腳本 發布:2025-03-13 07:57:26 瀏覽:753
ubuntu編輯python 發布:2025-03-13 07:56:32 瀏覽:529
伺服器如何配置介面域名 發布:2025-03-13 07:52:41 瀏覽:318
oracle物理存儲結構 發布:2025-03-13 07:43:00 瀏覽:821
大型ftp 發布:2025-03-13 07:41:20 瀏覽:20