go to previous page   go to home page   go to next page hear noise

Answer:

199/50 = 3 

50 goes into 199 three times and the remainder, 49, is dropped.


Mixed Integer and Float

Integer division is easy enough to see when it is by itself, but here is a more confusing case of the same thing:

1.5 + 7/2

The division is done first, because / has higher precedence than +. The result of the division, 3, is an integer. Now the floating point 1.5 is added to integer 3 to get floating point 4.5.

Integer arithmetic might be used in some parts of an expression and not in others, even though the final value of the expression is floating point.


QUESTION 7:

What is the result of evaluating the following expression:

1/2 + 1/2