Extra Credit 2, Data Output (15 points)


The program tempinfo.f inputs and processes data from the file temp.data. The file contains records from one day's reporting of temperature at 12 monitoring stations. The first column of information is the time that the information was received (hours after midnight), starting with the 1 AM reports. The second column contains the reporting station's ID number (1 through 12), and the third column gives that station's temperature to the nearest tenth of a degree Centigrade.

You must complete the subroutine "output" to report the minimum, maximum, average, and noon temperatures at the requested station. Because of Federal Regulation 1245.88.334, the reported temperatures must be in degrees Fahrenheit, and displayed in exactly the following format. The first two numbered lines are for your positioning information only. Do not include them in your output. Station number and temperature values are just examples, but reflect correct positioning and format.

1 2 3 4 5 6 7 1234567890123456789012345678901234567890123456789012345678901234567890 Station 1: Average Temperature was 70.3 F Minimum Temperature was 50.1 F Maximum Temperature was 100.3 F Noon Temperature was 90.2 F This report must be printed both to the screen and added to the end of a file called "temp.log". Be sure that if "temp.log" already exists, you keep all data in the file and add the new information to the end.

Leave a file named tempinfo.f in your homework directory.

Grading will be as follows:

Comments describing the subroutine and variables: 3 points

Correct type definitions for variables: 3 points

Correctly formatted output : 4 points

Correct output values: 2points

Correct opening and use of "temp.log": 3 points