Jun 11 2009

Temp Converter

Category: Javaadmin @ 12:19 am


//Purpose: Convert a Celsius temperature to Fahrenhit
 
public class tempConverter {
	public static void main(String[] args){
 
		float celsius = 100;
		float fahrenheit;
 
		//convert to Fahrenheit equivalent
		fahrenheit = 32 + ((9* celsius) / 5);
 
		System.out.println("Celsius temperature");
		System.out.println("  " + celsius);
		System.out.println("Equivalent Fahrenheit temperature");
		System.out.println("  " + fahrenheit);
		}
}

Tags: , ,

One Response to “Temp Converter”

  1. Joker says:

    Greatings, I have already seen it somethere…
    Have a nice day
    Joker

Leave a Reply