We've got a puzzle for you that will require a little thinking. Or you can Google the solution if you aren't too keen on math puzzles. In any case, you will do well to understand the whys and wherefores. You need to implement a method that takes a three-digit number and returns the sum of that number's digits.

# Sum of the digits of a three-digit number

- 6
Locked

Example: number = 123First digit = 123/100 =1Second digit = Modulus of number % 100 then dividing by 10 = 123 % 100 = 23 / 10 =2Last digit = Modulus of number % 10 = 123 % 10 =3