need help badly pleaseee What is the mod for

closed account (yh54izwU)
In logic I assumed it to be the same as in all programming language where all it really does is take the remainder but that doesn't seem to be the case.

I was trying to figure this out and I am baffled.


Suppose that a and b are ints, a is congruent to 4%13 and b is congruent to 9%13. Find the int c with c>=0 && c<=12
C is congruent to 9a%13

I keep thinking the answer is 0 because 4%13=1? 1%13=0? 0*9=0?
I tried it with 4%13=1 1*9=9 9%13=4? As well but that is NOWHERE near the correct answer which
Is somehow 10, anyhelp on this?

Thanks so much
a is congruent to 4%13

means that a mod 13 = 4.

If c is 9a, then c = 9*4 mod 13
= 36 mod 13
= (36 -13 -13) mod 13
= 10 mod 13

Thus c is congruent to 10 mod 13


As an aside:
4%13=1

No, 4 % 13 = 4. You could think of this as 4/13 = 0, with 4 remainder.
1%13=0

Similarly to above, 1%13 = 1




Last edited on
closed account (yh54izwU)
Thanks my discrete professor is not the best I heard he got booted from database concepts mid-semester to give you an idea.
Topic archived. No new replies allowed.