Assignment due by 11:59 pm on Thursday, September 17, 2009
Assignment submission instructions:
- Download the following C program and add your code to it.
- Rename it using your UNCW username like this: abc1234_a1.c
- Make sure to type your name in at the top of the program and read the statement that follows.
- Login to your UNCW email account
- Create an email addressed to narayans@uncw.edu with the subject:Your Name: CSC 112 Project 1 Submission
- Copy yourself on the email.
- Attach your C program file to the email.
- Send the email before the deadline.
Assignment Instructions
This text file contains the daily record high and daily record low temperature for each day of the year for the period 1874-2008 for Wilmington, NC. Download the file and save it. The first line in the file is for January 1, and the last line corresponds to December 31. There is a line in the file corresponding to February 29.
Write a C program that reads the data in the file and determines the following:
- On which day was the highest temperature ever recorded and what was the temperature? Your program will produce an answer like: The highest temperature of xx degrees was recorded on Month, Day, Year (for example, July 4, 1992)
- On which day was the lowest temperature ever recorded and what was the temperature? Your program will produce an answer like: The lowest temperature of xx degrees was recorded on Month, Day, Year.
- How many of the record high temperatures were recorded during the period 1874-1915? Your program will produce an answer like: xx highs were recorded in the period 1874-1915.
- How many of the record low temperatures were recorded during the period 1874-1915? Your program will produce an answer like: xx lows were recorded in the period 1874-1915.
- How many of the record high temperatures were recorded during the period 1916-1958? Your program will produce an answer like: xx highs were recorded in the period 1916-1958.
- How many of the record low temperatures were recorded during the period 1916-1958? Your program will produce an answer like: xx lows were recorded in the period 1916-1958.
- How many of the record high temperatures were recorded during the period 1959-2008? Your program will produce an answer like: xx highs were recorded in the period 1959-2008.
- How many of the record low temperatures were recorded during the period 1959-2008? Your program will produce an answer like: xx lows were recorded in the period 1959-2008.
You will be using scanf statements to read in the data. However, instead of typing in the data, your program will read it in from the file by redirecting the input. Run your program like this:climateAnalysis < records.txt. The < sign tells your program to read the data from the file.