The remainder operator (%)

The remainder operator (%)

Dividing the value of one expression by the value of another expression returns the remainder.

result = number1 % number2

parameter

result

Any variables .

number1

Any numeric expression .

number2

Any numeric expression.

Description

The remainder (or remainder) operator   divides number1 by  number2  (rounds the floating-point number to an integer), and then returns only the remainder as the  result . For example, in the following expression, A (ie  result ) is equal to 5.

A = 19 % 6.7

Guess you like

Origin blog.csdn.net/Qianliwind/article/details/51612414