I understand the topic in general:
x mod y = r, x is the dividend, y is the divisor and r is the remainder.
but I don't understand how 2 mod 5 = 2, does this come from 5*0 +2 = 2?
Have a look at this table.
Note that the output is a number \(\displaystyle 0\le n\le 4\)
But in particular, note the output for the negative numbers. Make sure that you understand those answers,
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.