you are viewing a single comment's thread
view the rest of the comments
[–] 8 points 9 months ago

You are misunderstanding what the remainder is.

5 % 2 == 1, because 5 == 2 x 2 + 1

10 % 7 == 3, because 10 == 1 x 7 + 3

Your "edit 2" is mostly correct. I don't think of it "undoing" the division. But if that makes sense to you then I guess it's fine

  • source
  • parent