Here is an example: -45 mod 13 = 7, but how?
so, -45 mod 13 = mod (-45 + 52) mod 13 = 7 mod 13 = 7 Just add a big enough multiple of the modulus so you have a positive number.
You can ask a new question or answer this question.