Question
In this assignment you will be determining the date on which the average temperature change in Temperature (A) for the city of Ft Lauderdale minimum, from July 1 2016. to July 31 2016. In order to do this, you will need to do the following Think about the easiest way to clean up the data and carefully choose which data you need to use from the data set. 1. Using C++, write a program to read the data, determine AT, and send a report with the Month. Day. AT to an output file. For the city of Ft Lauderdale from July 1 2016. to July 30 2016. Data available in the above excel document. 2. Determine the minimum AT and output this value along with the city, Day and Month to the console 3. Append the data file with the statement "The day of the year with the closest average minimum and average maximum temperatures in the city of (city, FL) is (month)(day)
Explanation / Answer
#include #include #include using namespace std; void getdata(ifstream & citydata, string & name, double temps[][2]); void averagehigh(double temps[][2], double sum, double & average); void averagelow(double temps[][2], double sum, double & average); void indexhightemp(double temps[][2], double highest, double & index); void indexlowtemp(double temps[][2], double lowest, double & index); int main() { string city; double temperatures[12][2], average1, sum1=0, average2, sum2=0, highest1 = 0 , index1, lowest1 = 0, index2; ifstream data; //*************************************** data.open("averagetemps.txt"); //************************************** getdata(data, city, temperatures); //****************************************** cout