16
Integer Division
•
Division between two integers results in an
integer:
•
The result is truncated, not rounded
–
5/3
is equal to 1
–
3/6
is equal to 0
•
Division with an integer and a floating point
number results in a floating point number:
–
5/3.0 = 1.6666
–
3.0/6 = 0.5