```
#include <iostream>
#include <iomanip>
#include <cstdlib>
using namespace std;
const int numberOfRows = 2;
const int numberOfColumns = 12;
void getData(int matrix[][numberOfColumns], int noOfRows);
void avgHigh(int matrix[][numberOfColumns], int noOfRows);
void avgLow(int matrix[][numberOfColumns], int noOfRows);
void pause ( );
int main ()
{
int temps[numberOfRows][numberOfColumns];
getData(temps, numberOfRows);
avgHigh(temps, numberOfRows);
cout << endl;
avgLow(temps, numberOfRows);
cout << endl;
pause ( );
return 0;
}
void getData(int matrix[][12], int rowSize)
{
cout<<"Enter high temperature for each month"<<endl; ;
for (int rows=0; rows<1; rows++)
for (int cols =0; cols<12; cols++)
{
cin>>matrix[rows][cols];
cout<<matrix[rows][cols];
cout<<endl;
}
cout<<"Enter low temperatures for each month"<<endl;
for (int rows=0; rows<1; rows++)
for (int cols =0; cols<12; cols++)
{
cin>>matrix[rows][cols];
cout<<matrix[rows][cols];
cout<<endl;
}
}
void avgHigh(int matrix[0][12], int rowSize)
{
int rows, cols;
int sum;
int average;
for (rows = 0; rows < 1; rows++)
{
sum = 0;
for (cols = 0; cols < 12; cols++)
sum = sum + matrix[rows][cols];
average=sum/12;
cout << "Average high temperature: " << average<<endl;
}
}
void avgLow(int matrix[1][12], int rowSize)
{
int rows, cols;
int sum;
int average;
for (rows = 0; rows < 1; rows++)
{
sum = 0;
for (cols = 0; cols < 12; cols++)
sum = sum + matrix[rows][cols];
average=sum/12;
cout << "Average low temperature: " << average<<endl;
}
}
void pause()
{
cout << endl;
cout << "Enter a character to quit --> "; //
char dummy;
cin >> dummy; // Wait
}
```