If the two-digit integer is 29 If it is 29/10, the decimal point will be truncated. In other words, the answer of 29/10 is output as 2 instead of 2.9. Perform 2% 10 as the next calculation. It doesn't break at 10, so the remainder is 2. In other words, the tens place is 2.
Similarly, if you try to get the number in the 100s, Obtained at 378/100% 10. 378/100=3 3% 10 is 3.
After that 1st place integer / 1% 10 10's place integer / 10% 10 Integer in the hundreds / 100% 10 1000's place integer / 1000% 10 ・ ・ It seems that it can be used.
In conclusion, it is not necessary when you want to bring the largest digit. Because it's already a single digit number.
Bring the tens place of 23 →23/10=2 Completed with
Bring the tens place of 123 123/10=12 12%10=2 Completed with
that's all
Recommended Posts