We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.

- Prepare
- C
- Conditionals and Loops
- Sum of Digits of a Five Digit Number

# Sum of Digits of a Five Digit Number

# Sum of Digits of a Five Digit Number

- Prepare
- C
- Conditionals and Loops
- Sum of Digits of a Five Digit Number

**Objective**

The modulo operator, `%`

, returns the remainder of a division. For example, `4 % 3 = 1`

and `12 % 10 = 2`

. The ordinary division operator, `/`

, returns a truncated integer value when performed on integers. For example, `5 / 3 = 1`

. To get the last digit of a number in base 10, use as the modulo divisor.

**Task**

Given a five digit integer, print the sum of its digits.

**Input Format**

The input contains a single five digit number, .

**Constraints**

**Output Format**

Print the sum of the digits of the five digit number.

**Sample Input 0**

```
10564
```

**Sample Output 0**

```
16
```