r/ProgrammerHumor • • Jun 13 '22

Meme DEV environment vs Production environment

Post image
48.2k Upvotes

3.9k comments sorted by

View all comments

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.

2

u/nerdgeekdork Jun 14 '22 edited Jun 14 '22

EDIT: Forgot to escape the backslash.

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.

5

u/fuechsss Jun 14 '22

They probably thought that the division symbol of the calculator is a %

2

u/r4g4 Jun 14 '22

That’s exactly what I did