Ask coding questions

← Back to all posts
Sum of digits
TheHappyCow

How to get the sum of digits of an number that the user inputs? I have no clue how to start! C:

Voters
TheHappyCow
Comments
hotnewtop
Wumi4

Do you mean calculate sum like 125 is 1 + 2 + 5?

TheHappyCow

@Wumi4 Yes! Exactly