← all problems
Given a non-negative int n, return the sum of its digits. sumDigits(126) returns 9 (1+2+6). sumDigits(49) returns 13.