Question: (10) Given the following program fragments: int i = 4, j = 17; float z = 2.6; Determine the value of each of the following
- (10) Given the following program fragments:
int i = 4, j = 17;
float z = 2.6;
Determine the value of each of the following expressions. If the result is a floating point value, include a decimal point in your answer.
- i / (float) j
- 1.0 / i + 2
- z * j
- i + j % i
- (1/2) * i
- 2 * i + j i
- j / 2
- 2 * 3 1 % 3
- i % j / i
- (int)(z + 0.5)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
