// Celsius.java (c) 2004 Kari Laitinen // http://www.naturalprogramming.com // 2004-10-10 File created. // 2004-12-19 Last modification. import java.util.* ; class Celsius { public static void main( String[] not_in_use ) { Scanner keyboard = new Scanner( System.in ) ; int[] array_of_degrees_fahrenheit = { 32, 34, 36, 37, 39, 41, 43, 45, 46, 48, 50, 52, 54, 55, 57, 59, 61, 63, 64, 66, 68, 70, 72, 73, 75, 77, 79, 81, 82, 84, 86, 88, 90, 91, 93, 95, 97, 99, 100, 102 } ; System.out.print( "\n This program converts temperatures given in" + "\n degrees Celsius to degrees Fahrenheit." + "\n Please, give a temperature in degrees Celsius: " ) ; int degrees_celsius = keyboard.nextInt() ; System.out.print( "\n " + degrees_celsius + " degrees Celsius is " + array_of_degrees_fahrenheit[ degrees_celsius ] + " degrees Fahrenheit. \n" ) ; } }