---
# System prepended metadata

title: 16-2 奇數和
tags: [DICE C]

---

---
tags: DICE C
---

16-2 奇數和
===

> [name=CHAWTeam]

---

目錄：[DICE C語言程式破解](https://hackmd.io/@CHAWTeam/DiceC)

---

題目
--

```!
計算整數1到99，公差為2的累加和。
如1+3+5+...+99的和。

輸出範例: 
2500 
```

程式碼
--

```c=
#include <stdio.h>

int main()
{
    printf("%d", 1 * 50 + 50 * (50 - 1) * 2 / 2);
    return 0;
}
```

輸出
--

```!
2500
```

---

[查看我們在HackMD上的所有筆記](https://hackmd.io/@CHAWTeam)
目錄：[DICE C語言程式破解](https://hackmd.io/@CHAWTeam/DiceC)

---

{%hackmd Iiu5mOixR7yWkPHKCkabBg %}
<iframe class="LikeCoin" height="235" src="https://button.like.co/in/embed/chawteam/button?referrer=https://hackmd.io/@CHAWTeam/DiceC-16-2" width="100%"></iframe>

---

{%hackmd i1nMRrZcTFmTvoF897K9zg %}