Menu
Question Index
...

What will be the output of the following program?

public class CelsiusConversion {
    public static void main(String[] args) {
        int c = 20;
        double kelvin = c + 273.15;
        System.out.println(kelvin);
        int Rankine = (int) (c + 273.15 * 9 / 5);
        System.out.println(Rankine);
        double delisle = (100 - c) * 3 / 2;
        System.out.println(delisle);
    }
}


293.15
511
120.0
293.15
511.66999999999996
120.0
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