Programming Drill #2

Due: Wednesday, May 21
Goal: Explore arithmetic operations and issues with integer division

Here is the formula to convert a temperature from fahenheit to celsius:

celsius = (fahrenheit - 32) * 59

Write a Java program that makes two int variables, one for celsius and one for fahrenheit.  Set fahrenheit to 100.
Your program should then compute the temperature in celsius and output it.  First use this formula:

celsius = (fahrenheit - 32) * (5 / 9);

Second, use this formula:

celsius = 5 * (fahrenheit - 32) / 9;

You should get different results.  Why? How could you fix the first one to get the correct result?