Return the sum of the digits of a positive number. For 4728 that is 4+7+2+8 = 21.
int digitSum(int n)
Examples
There are also 4 hidden tests you can't see. Solve the problem, not the examples.