// f_to_c.java compile javac -cp . f_to_c.java // execute java -cp . f_to_c fahrenheit returns celsius // temperature fahrenheit celsius kelvin degrees // -459.67 -273.15 0.0 absolute zero // 32 0 273.15 water H2O freeze // 212 100 373.15 water H2O boils // 2750 1510 1783.15 some steel melts // a water molecule having two hydrogen atoms and one oxygen atom // a copper wire at absolute zero has zero resistance, super conducting public class f_to_c { public f_to_c(double f) { double factor = (double)100/(double)(212-32); double c; System.out.println("f_to_c.java fahrenheit to celsius running"); c = (f-32.0)*factor; System.out.println(f+" degrees fahrenheit = "+c+" degrees celsius"); } public static void main (String[] args) { new f_to_c(Double.parseDouble(args[0])); } } // end f_to_c