Your assignment is to write a program that reads in three temperatures in Fahrenheit, converts them to Celsius and displays the result. The formula to convert Fahreheit to Celsius is shown below. WATCH OUT FOR INTEGER ARTIHMETIC!
The input and output will be decimal numbers. The program will use redirection to read the input from the computer's disk, rather than from the keyboard. Since there is no direct user input your program does not need a prompt or to echo the input. Don't reinvent the wheel. This program is very similar to your previous assignments.
The program output should appear similar to the following:
C:\>cd Documents and Settings\c1\My Documents
C:\Documents and Settings\c1\My Documents>TempConv.exe<data.txt
Fahrenheit value - 212
Celsius value - 100
Fahrenheit value - 32
Celsius value - 0
Fahrenheit value - -40
Celsius value - -40
data
. Close Notepad.
C:\>
(if your user id is not c1, then use c2 or c3).
cd Documents and Settings\c1\My Documents
TempConv.exe<data.txt
where TempConv is the name you gave your program. If
you gave
your program a different name than TempConv use that name.
exit
main()
. To process the numbers, call the functions three times.
.cpp
to email and send it to mrsimon@lycos.com