Modulo calculator
Modulo operation is different from remainder operation. "Mod" is the transliteration of "Mod", and modular operation is mostly used in programming. Mod means remainder. Modulo operation is widely used in number theory and programming, from the determination of odd and even numbers to the determination of prime numbers, from modular power operation to the method of finding the greatest common divisor, from the Grandson problem to the Caesar cipher problem, all of which are filled with modular operation. Although many number theory textbooks have a certain introduction to modular operation, most of them are based on pure theory, and do not involve much about the application of modular operation in programming.
For example, 11 Mod 2, the value is 1
The above modular operations are mostly used in program writing. Here is an example to illustrate the principle of modular operations:
Turbo Pascal explains mod like this:
A Mod B = A-(A div B) * B (div means integer division)