Given <code>double avg = 7.8;</code>, the result of <code>(int)(avg * 10) / 10.0</code> is
- A
78.0
- B
7.0
- Ccheck_circle
7.8
- D
0.78
Explanation
avg*10 = 78.0; (int)78.0 = 78; 78 / 10.0 = 7.8.
AP Computer Science A· difficulty 3/5
Given <code>double avg = 7.8;</code>, the result of <code>(int)(avg * 10) / 10.0</code> is
78.0
7.0
7.8
0.78
Explanation
avg*10 = 78.0; (int)78.0 = 78; 78 / 10.0 = 7.8.
Want 10 more like this — adaptive to your weak spots?