當前位置:首頁 » 編程語言 » 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;

}

熱點內容
kindeditor上傳圖片絕對路徑 發布:2025-05-14 01:06:27 瀏覽:275
廣數g96編程實例 發布:2025-05-14 01:01:56 瀏覽:911
安卓手機如何做一個小程序 發布:2025-05-14 01:01:51 瀏覽:968
linux怎麼訪問外網 發布:2025-05-14 01:00:24 瀏覽:952
玩dnf什麼配置不卡卡 發布:2025-05-14 00:57:02 瀏覽:806
android優秀項目源碼 發布:2025-05-14 00:54:58 瀏覽:205
dell伺服器怎麼裝系統 發布:2025-05-14 00:50:52 瀏覽:593
csgo怎麼進日本伺服器 發布:2025-05-14 00:39:18 瀏覽:747
ip查伺服器商家 發布:2025-05-14 00:33:37 瀏覽:212
雲伺服器布 發布:2025-05-14 00:27:55 瀏覽:78