previous |
start |
next
Division and Remainder
- / is the division operator
- If both arguments are integers, the result is an integer. The
remainder is discarded
- 7.0 / 4 = 1.75
7 / 4 = 1
- Get the remainder with % (pronounced "modulo")
7 % 4 = 3
previous |
start |
next