Modulus

Description:

Perform Mod operation or integer division on two integers.

Syntax:

x%y

Get remainder

x\y

Get the integer part

Note:

The operation gets the integer part or the remainder part after division of one integer/long integer by another.

Parameters:

x

Integer or Long integer

y

Integer or Long integer

Return value:

An integer

Example:

 

A

 

1

=7%2

1

2

=7\2

3

Related functions:

cmp()