#include <iostream>
#include <fstream>
#include "tempFns.h"
usingnamespace std;
int main (void)
{
// DO: declare an array of type double called temperatures
// Use the constant MaxDays for the number of rows
// and the constant MaxTimes for the number of columns
double tempAvg [MaxDays]
int matrix A[MaxDays][MaxTimes]
for (i=0, i<numDays,i++)
for (j=0, i<numTimes,i++)
}
int numDays = 0; // holds number of days in the month
int numTimes = 0; // holds number of times the temperature is measured each day
// Read the data from a file
inputFmFile (temperatures, numDays, numTimes);
// Display the data on the screen
cout << "Temperature data before calculating averages." << endl;
outputData (temperatures, numDays, numTimes);
cout << endl;
// DO: Call the function tempAvg () here
tempAvg ()
// Display the data on the screen
cout << "Temperature data after calculating averages." << endl;
outputData (temperatures, numDays, numTimes+1);
cout << endl;
cout << "Bye!" << endl;
return 0;
}
lines 15,17 need ;s
line 17, a variable name cannot have a space in it.
both for loops use the same variable i (it is overwritten).
the { } around the for loops serve no purpose.
the for loops don't do anything (you probably wanted to set matrix_A[i][j] to 0, though a ; would make this valid code).
line 35, when you call a function you don't mention its return type (just tempAvg() )
the rest is fine, provided that all functions are defined.