/* Convert Fehrenheit to Celsius. Arithmetic expressions, type conversions, casting */ import java.io.*; class Celsius { public static void main (String[] args) throws IOException { final int base = 32; int fahrenheit; BufferedReader stdin; stdin = new BufferedReader (new InputStreamReader (System.in)); System.out.print ("Enter the temperature: "); fahrenheit = Integer.parseInt (stdin.readLine()); System.out.println ("Celsius equivalent is: " + ((float)fahrenheit-base)*5/9); } }