Right, it’s more technically called a modulo, but in school we always called it “remainder”.
Remember learning long division? If the divisor doesn’t evenly divide into the dividend, you have a “left over” number or a “remainder”. If I try to divide 24 by 10, 10 goes in twice but then I have 4 left over, the remainder, the modulo. Another way to think about it is if I got the decimal answer (2.4), rounded it down (to 2), multiplied it by the divisor (2 X 10 = 20) and then subtracted it from the original dividend (24 - 20 = 4), it yields the remainder.
Thank you, I think I get it now. But since we are rounding up. How is 11 % 3 = 2. When 11/3 = 3.67 , so shouldn’t be 11 % 3 = -1 if we round up? Or do we just drop the decimal number?
Or (in the interest of helping) you could also say that this way:
13 / 4
13 = (4 * 3) + 1
or more abstractly:
dividend = (divisor * quotient) + remainder
If we insist that answer is an integer. This is sometimes referred to as “Euclidean division” or “remainder division”. It is usually the first division that you learn in school, that the answer is a quotient and a remainder. If a teacher asked you in 2nd grade, “What is 13 divided by 4?”, you’d answer “4 goes evenly into 13 three times, with a remainder of 1”. The modulo operator (%) is just shortcut to the remainder.