Lab 2 - Conditionals
Due: Wednesday, September 13 at 11:59pm


This lab is designed to give you some experience using "conditionals", e.g., the "if statement".

The Assignment

This lab should prompt the user for two tempuratures in Farneheit. It should compare them to determine the greater of the two. Then, it should print the greater of the two -- but in Centigrade. The formula to convert from Farenheit into Centigrade is as below:

    TempC = (5/9)*(TempF - 32)

Sample Output

Below is an example run of the program. The user's input is shown in italics.

      Enter tempurature in Fahrenheit: 72
      Enter tempurature in Fahrenheit: 70
      21.2222222222 Centigrade is the greater of the two tempuratures.

Important note: Your result might be slightly different due to the precision of float-point-type numbers.


We'll talk about this on Friday.