What is the value of the expression 99/100 ?
0
The normal rules of arithmetic are used to determine the sign of the result of integer division:
+num/+div == +result | -num/+div == -result | +num/-div == -result | -num/-div == +result |
It is easiest to first calculate the result as if num and div were positive, then apply the above rules. For example:
17/5 == 3 | -17/5 == -3 | 17/-5 == -3 | -17/ -2 == 3 |
Of course, you are eager to practice this right away! Mentally (or with scratch paper) decide on the value of each expression. Then click on the button to see the correct value.