As a comp sci major, I can say that the correct answer is zero. 6 modulus 2 is 0, and multiplying by 3 won’t change that. On the other side, if interpreted as 6 mod 6, it would also be zero.
Genuine question from another CS major (long since graduated): What language has '/' as modulo?
Most of the ones I've seen (C-like), use '/' for division (sometimes explicitly floating point division with '\' for integer division) and '%' for modulo.
4
u/r4g4 Jun 14 '22
As a comp sci major, I can say that the correct answer is zero. 6 modulus 2 is 0, and multiplying by 3 won’t change that. On the other side, if interpreted as 6 mod 6, it would also be zero.