Choosing how to earn college credit? CLEP vs AP guide
| preferred AP College board partner for AP classes
hard

Temperature Conversion Logic

Mark
< Prev
Next >

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

Did You Know?
Explain Why
Explain All Answers
Check Answer
Show Correct Answer
Report Question

Question Leaderboard

Not enough data yet to show leaderboard.

No comments yet. Be the first to comment!

AI Tutor

How can I help?

APFIVE © 2020.
Email: apfive@apfive.org|Instagram: @_apfive_|Privacy Policy|