Sum Digits

Beginner
100 XP

Challenge Description

Write a function that takes a non-negative integer and returns the sum of its digits.

Examples

Example 1:

Input:

"1234"

Output:

10
Example 2:

Input:

"0"

Output:

0

Languages

Challenge Stats

Total Attempts

0

Status