Here is code:
import java.util.Scanner;
public class Temperature {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.print("Enter celsius : ");
double celsius = sc.nextDouble();
double fahrenheit = (1.8 * celsius) + 32;
System.out.println("Celsius to F => " + fahrenheit);
System.out.print("\nEnter kelvin : ");
double kelvin = sc.nextDouble();
double celsiusCon = kelvin - 273.15;
System.out.println("Kelvin to C => " + celsiusCon);
}
}
Output:
T_N919_1 what is polymorphism, give and example? write a Java class to calculate temperature conversion to...
In java Se8 i am trying to write a program convert temperature
between celsius, fahrenheit and kelvin, but i am stuck at how to
return the proper result without chage the frame, and I cnould not
figure out how to use those three settemp method.
import java. uti1. Arrays public class Temperature different scale names/ public static Stringll scales -Celsius", "Fahrenheit", "Kelvin private double temperature private char scale; public Temperature (double temp temp 273. 15; this. scale-C if (temp <-273....