Lab 3

2/17/04

Task: Write a program that asks the user whether they want to convert a temperature from Celsius to Fahrenheit or from Fahrenheit to Celsius. Print out the appropriate conversion.

Fahrenheit to Celsius:
C = (F-32) * 5/9

Celsius to Fahrenheit: F = (C*9/5) + 32

Use functions to do the conversions.

Purpose: The primary purpose of this program is to introduce if statements. A secondary purpose is to get more practice with functions.


Solution