I was checking some websites about modular arithmetic, and i read this :
(x + y) % n = (x % n) + (y % n)
Is this correct ?
What if we take : x = 4, y = 2, n = 5 ? We will have 1 = 6 !?
I was checking some websites about modular arithmetic, and i read this :
(x + y) % n = (x % n) + (y % n)
Is this correct ?
What if we take : x = 4, y = 2, n = 5 ? We will have 1 = 6 !?
Correct is
$(x + y) \div n = [(x \div n) + (y \div n)] \div n$.