MOD()

MOD(X,Y)

RETURNS THE MODULO OF X AND Y

  • Type: Function
  • Parameters: 2
  • Group: Mathematics

ACTION

The function MOD(X,Y) returns the modulo of X and Y.

The modulo of X and Y is the remainder of X by Y integer division.

X and Y can be a real or integer number. If X or Y is a real number, it is rounded to the nexter integer.

SYNTAX: Result=MOD(X,Y)

  • X = real or integer value.
  • Y = real or integer value.

USE

  • The function MOD(X,Y) is used to get the modulo of X and Y.

ERROR

  • If X or Y are not correct expressions.

EXAMPLE

print mod(70, 60)

print "Result = 10"

SEE ALSO

INT()

FRAC()