Asking me this question means that you don't understand how the code works
I'm using two operators, the division (/) and modulo (%)
When you divide two integers then the result is also an integer and the decimal digits are truncated so if you divide 100/9=11.11 you get a result of 11.
When you divide 9/10=0.9 you get a result of 0 , when you divide 10/4=2.5 you get a result of 2
The modulo, when you use it you get the remainder of the division.
10%4=2 , because 10/4=2 times and the remainder is 2 ( 10-(2*4)=2)
20%3=2 , because 20/3=6 times and the remainder is 2 (20-(3*6)=2)
Now using all that suppose that we have a decimal number like 1234
1234/1000=1.234 which gets truncated to 1 and you get the first digit
1234%1000=234 and 234/100=2.34 which gets truncated to 2 so (1234%1000)/100=2 gives you the second digit
1234%100=34 and 34/10=3.4 which gets truncated to 3 so (1234%100)/10=3 gives you the third digit
1234%10=4 , this time you don't need to do a division so (1234%10)=4 gives you the fourth digit
Alex