As one of the requirements to earn an A- or higher, you must complete exercise 9 on pp 541-542 regarding temperature highs, lows, and averages. Please note that I have changed the requirements from the exercise in the book slightly: you are to track a single week's data, not an entire year's.Updated!
You need to write three functions; these are their headers:
void getTemperatureData(double data[][COLS])
void calculateAverages(int data[][COLS],
double &avgLow, double &avgHigh)
void displayResults(double &avgLow,
double &avgHigh)
If you use an array of strings for the names of the days of the week, you can do all of your input in a nice, tidy for loop.
Sample Output
Here is a screenshot of my code running.Climate Tracker output
Refer to the deliverables post for comment formatting and required program identification information.
Due Date:
Sunday, December 11th, 6:00pm