iT邦幫忙

0

[Day 13]實作-連加總程式

  • 分享至 

  • xImage
  •  

題目

輸入一個整數 n(1 ≤ n ≤ 1000)。輸出 1 + 2 + 3 + ... + n 的結果。

程式:

https://ithelp.ithome.com.tw/upload/images/20251024/201793095xOd7Ppe46.png

輸出:

https://ithelp.ithome.com.tw/upload/images/20251024/20179309LlVjUbBymZ.png


圖片
  熱門推薦
圖片
{{ item.channelVendor }} | {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言