+ 1
Hi guys ,how it works ,how??? especially middle part(m*10+n%10)(n=n/10)
6 ответов
+ 3
n%10 gets the remainder of a divide by ten so 123%10 is 3 as 120 is 12*10 leaving the 3. n=n/10 drops the ones column so 123/10 is 12. m=m*10+n%10 shifts m up a column and adds the new digit so 12*10+3 becomes 123.
+ 1
too hard and confuse
+ 1
output will be 321 after that?
+ 1
If input is 123,
Line 8 makes m=0
Line 9 is true
Line 11 makes m=3
Line 12 makes n=12
Line 9 is true
Line 11 makes m=32
Line 12 makes n=1
Line 9 is true
Line 11 makes m=321
Line 12 makes n=0
Line 9 is false
+ 1
thank u very much)
+ 1
I get it