The operands of the modulo operator are converted to integers (excluding decimal digits) before the operation ). The result of the modulo operator % is the same as that of the divisor (plus or minus sign. That is, do you still remember the basic mathematical knowledge learned in school in the result of $ a % $ B and $? Just like them.
Arithmetic operators
Example name result
-$ A: returns the negative value of $.
$ A + $ B addition: sum of $ a and $ B.
The difference between $ a-$ B subtraction $ a and $ B.
The product of $ a * $ B multiplication $ a and $ B.
$ A/$ B Division $ a divided by the operator of $ B.
$ A % $ B modulo $ a divided by the remainder of $ B.
The division operator always returns a floating point number. Only in the following cases: both operands are integers (or integers converted into strings) and can be fully divided. in this case, an integer is returned.
The operands of the modulo operator are converted to integers (excluding decimal digits) before the operation ).
The result of the modulo operator % is the same as that of the divisor (plus or minus sign. That is, the result of $ a % $ B is the same as that of $. For example: