3%10-1 = 2 how??? | Sololearn: Learn to code for FREE!


3%10-1 = 2 how???

modulo operator is used for remainder.

5/9/2018 5:31:15 PM

Syeda Zobia Kanwal

3 Answers

New Answer


simple rule remember this.. if L.H.S is smaller than R.H.S side in case of modulo The L.H.S is a answere 4%5=4 So simple 5| 4|0 . 4 i.e as we know modulo give us reminder.. I hope you understand.. i try as simple as i can..


step 1>> 3%10=3 //modulo operator has highest precedence step 2>> 3-1=2 that's the ways


thanks a lot! I didn't know about the l.h.s rule for the Smaller value, I was doing it by the other way.