0

still can't understand the modulo operation ??

working of the operator

16th Oct 2016, 3:50 PM
Saurabh Sharma
Saurabh Sharma - avatar
3 Answers
+ 2
It gives you the remainder of the euclidian division. For example: 42%11 is 9, because 42 = 11*3 + 9 (and you have 0 <= 9 < 11) n%m is 0 if n is a multiple of m n%2 is 0 if n is even and 1 if n is odd n%10 gives you the last digit of n n%100 gives you the last two digits etc.
16th Oct 2016, 3:55 PM
Zen
Zen - avatar
0
thanks understood in a lot deep through you.... thanks
16th Oct 2016, 3:59 PM
Saurabh Sharma
Saurabh Sharma - avatar
- 1
poopy...........:)
16th Oct 2016, 9:19 PM
Coolchris
Coolchris - avatar