Temperature Conversion Logic
A program converts a raw temperature reading using double precision for intermediate steps before truncating to an integer.
What is printed when the following Java program is compiled and run?
public class QuestionTrace {
public static void main(String[] args) {
int raw = 85;
double factor = 0.5556;
int result = (int) (raw * factor);
System.out.print(result);
}
}
A
47
B
48
C
45
D
46
Question Leaderboard
Not enough data yet to show leaderboard.
