Share
Explore BrainMass

Average high, Average low, Highest and Lowest temperatures

Write a C++ program that uses a two-dimensional array to store the highest and lowest temperature for the first five months of the year. The program should output the average high, average low, and the highest and lowest temperatures for the year.

The program must consist of the following functions:
* Function indexHighTemp: This function returns the index of the highest high temperature in the array.
* Function indexLowTemp: This function returns the index of the lowest low temperature in the array.

Please refer to the attachment for how a sample run would look like.

Attachments

Solution Summary

Code is self-explanatory and modestly commented. It works with negative temperature values as well.

$2.19