Java Software Solutions >EX2.7 > Solution

Problem:

What value is contained in the floating point variable depth after the following statements are executed?
depth = 2.4;
depth = 20 – depth * 4;
depth = depth / 5;

Output:

Not Applicable

Solution:

The final value stored in depth is 2.08.

No comments:

Post a Comment