Modulus and modulo in programming

Modulus and modulo in programming
Modulus and modulo in programming
Modulus and modulo in programming
Modulus and modulo in programming

Many students meet the modulus first in programming. There, the % sign is read as modulo. In Java, 23 modulo 5 is 3: the remainder of 23 divided by 5. That remainder is called the modulus. In C plus plus, it is the same: 23 mod 5=3\displaystyle 23 \bmod 5 = 3. In C sharp, too. And in JavaScript, 23 mod 5=3\displaystyle 23 \bmod 5 = 3. On this calculator, INT÷ gives the same number: R\displaystyle R is the modulus.

▶ Watch this step in the video (1:07:55)