I solved it after looking up StackOverflow for examples around the modulus or remainder (%). I copied code, changed it to mine, and solved the puzzle, but now I still don't how this works EXACTLY.

**int sum = 0; while (number > 0) { sum = sum + number % 10; number = number / 10; } return sum;**Can someone in plain English explain what this code does, step by step? It seems rather important, so I actually want to understand what I'm doing, instead of just copying stuff of the internet.
while (number > 0) { sum = sum + number % 10; number = number / 10; }becomeswhile (546 > 0) { 6 = 0 + 546%10; 54,6 = 546 / 10; }then becomeswhile (54,6 > 0) { 4,6 = 0 + 54,6%10; 5,46 = 54,6 / 10; }then becomeswhile (5,46 > 0) { 0 = 0 + 5,46%10; 0,546 = 5,46 / 10; }After that, the sum will keep answering 0. So I get 10,6 as when I return sum when I calculate it myself, but when Java does it, the answer is 15? I know my math is wrong, but where exactly?