當前位置:首頁 » 編程語言 » C語言疊數

C語言疊數

發布時間: 2023-07-06 13:31:43

c語言數的計數

#include<stdio.h>

int fun(int n)

{int i,s=0;

for(i=1;i<=n/2;i++)

s+=1+fun(i);

return s;

}

int main()

{int n,i,s;

scanf("%d",&n);

s=1+fun(n);

printf("%d ",s);

return 0;

}

熱點內容
scratch少兒編程課程 發布:2025-04-16 17:11:44 瀏覽:642
榮耀x10從哪裡設置密碼 發布:2025-04-16 17:11:43 瀏覽:368
java從入門到精通視頻 發布:2025-04-16 17:11:43 瀏覽:89
php微信介面教程 發布:2025-04-16 17:07:30 瀏覽:311
android實現陰影 發布:2025-04-16 16:50:08 瀏覽:794
粉筆直播課緩存 發布:2025-04-16 16:31:21 瀏覽:346
機頂盒都有什麼配置 發布:2025-04-16 16:24:37 瀏覽:213
編寫手游反編譯都需要學習什麼 發布:2025-04-16 16:19:36 瀏覽:818
proteus編譯文件位置 發布:2025-04-16 16:18:44 瀏覽:368
土壓縮的本質 發布:2025-04-16 16:13:21 瀏覽:594