Celsius To Fahrenheit In Java
Chapter:
Math Class
Last Updated:
04-05-2016 18:29:01 UTC
Program:
/* ............... START ............... */
public class JavaCelsiusToFahrenheit {
public static void main(String[] args) {
double temp = 100;
System.out.println("Celsius: " + temp);
temp = temp * 9 / 5 + 32;
System.out.println("Fahrenheit: " + temp);
}
}
/* ............... END ............... */
Output
Celsius: 100.0
Fahrenheit: 212.0
Tags
Celsius To Fahrenhei, Java, Math