CS1440 – Due October 27, 2000
Write a C++ program using the structure chart given on page (4) to compute the wind chill factor for a single case or for a case where an input file is provided.Your program has to have three options:
1)Run the program for a single case (input v and t and compute W, exit)
2)Run the program for an input file (use input file, compute Ws, exit)
The formula for computing wind chill factor is:
Where, v = wind speed in m/sec, t = temperature in degree Celsius: t <= 10, W = wind chill index (in degree Celsius).
Preparing“highhigh.dat” file: Use pico to open a blank file on cs (% pico highhigh.dat) and copy the high temperature (3rd column on the table) for the first column of your input file and the high wind speed (11th column on the table) for the second column of your input file.Example:
Note that there is a single blank space between the two numbers.Once you copy all data for 30 days, save the file and exit.
Preparing“midmid.dat” file: Copy the mean temperature (2nd column on the table) for the first column of your input file and the high wind speed (10th column on the table) for the second column of your input file.Example:
Once you copy all data for 30 days, save the file and exit.
You will read these two files and will generate two output files one for each input.The output files should include (Use 2 decimal points only to represent the real values).
DayWind SpeedTemperatureWind Chill
Call the output file corresponding to the highhigh.dat input high.out and the one corresponding to the midmid.dat input file mid.out.