Free Pascal <-> JavaScript | Modulo
Free Pascal Used keywords: mod
mod
Description
par1 mod par2
Input
- par1 - Any number
- par2 - Any number
Output
- Result - Numbers
Examples
Free Pascal
Modulo the possible of use:x := 90 mod 8; // x = 2
y := 15 mod 4; // y = 3
z := (x mod y) mod 5;// z = 2
Free Pascal
Even one example in what situations we can use the operation modulo:i mod 4
121 mod 40
($ff mod 50 mod 10) mod 2
.
JavaScript Used keywords: %
%
Description
par1 % par2
Input
- par1 - Any number
- par2 - Any number
Output
- Result - Numbers
Examples
JavaScript
Modulo the possible of use:x = 90 % 8; // x = 2
y = 15 % 4; // y = 3
z = (x % y) %5;// z = 2
JavaScript
Even one example in what situations we can use the operation modulo:i % 4
121 % 40
(0xff % 50 % 10) % 2
You can find it in the following collections: arithmetic operators
Modulo in another programming language:
Differences to: