|
Why did the program print the first "40" without a decimal point, but printed the second one with a decimal point as "40.0" ? A good answer might be:The first value was stored in a variable of data type long, an integer type. Integers do not have fractional parts. The second forty was the result of a calculation involving a variable of data type double, a floating point type. |
CalculationHere is the program again:
Look carefully at the statement highlighted in red.
The parentheses around
When you have a calculation as part of a
|
QUESTION 8:Would it be convenient write some of those statements on two lines? Click Here after you have answered the question |