public class Exam1 {
public static double fahrenToCelsius( int degF ) {
return (5.0/9.0) * (degF - 32.0);
}
public static void main(String[] args) {
System.out.println("Fahrenheit\tCelsius");
for (int degF=0; degF<=32; degF++) {
double degC = fahrenToCelsius( degF );
System.out.printf("%d\t\t%.2f\n", degF, degC);
}
}
}