Menu
Question Index
...

What will be the output of the following program?

public class Fahrenheit {
    public static void main(String[] args) {
        double f = 70;
        double kelvin = (f + 459.67) * 5 / 9;
        System.out.println((int) kelvin);
        double newton = (f - 32) * 11 / 60;
        System.out.println((int) newton);
    }
}


294
6
293
6
Compilation Error
Runtime Error

Doubts

Problems

Topic: Temperature Conversion Program In Java

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App