New answers tagged

0

Remember what the modulo operation does. It returns the remainder of x % y. Each pass through the loop multiplies y * 10. Now, look at the numbers for the three identical results. The first one is the remainder of an integer divide, as you expected. But the next two digits in x, used in the next two loops, produce the same result. Let me both demonstrate ...


Top 50 recent answers are included