MOD
 
Syntax

argument1 MOD argument2
Description


MOD is the modulus or "remainder" arithmetic operator. The result of MOD is the integer remainder of argument1 divided by argument2.

Both arguments should be integers, MOD is not defined for floating point values.

Example

PRINT 47 MOD 7
PRINT 56 MOD 2
PRINT 5 MOD 3


The output would look like:
5
0
2
Differences from other BASICs

See also