Temperature Converter
public class Temprature
{
public static void main(String args[])
{
final double fahrenheit = 95.0;
double celsius;
celsius = (5.0/9.0) * (fahrenheit - 32.0);
System.out.println("\n\t\t\t::Fahrenheit -> Celsius::");
System.out.println("\tFahrenheit "+fahrenheit+" = "+celsius+" Celsius");
System.out.println("\n\t\t\t***THE END***");
}
}
NOTE: IN THIS PROGRAM WE USE "FINAL DOUBLE". FINAL KEYWORD IS USE TO DECLARE ANY CONSTANT.
public class Temprature
{
public static void main(String args[])
{
final double fahrenheit = 95.0;
double celsius;
celsius = (5.0/9.0) * (fahrenheit - 32.0);
System.out.println("\n\t\t\t::Fahrenheit -> Celsius::");
System.out.println("\tFahrenheit "+fahrenheit+" = "+celsius+" Celsius");
System.out.println("\n\t\t\t***THE END***");
}
}
NOTE: IN THIS PROGRAM WE USE "FINAL DOUBLE". FINAL KEYWORD IS USE TO DECLARE ANY CONSTANT.
No comments:
Post a Comment