I have this project code i have to complete,but, I'm stuck, it has to display a table this is the description(this program analyzes the data from temperature sensors for each of the seven computers in a room).
this is what i did so far I'm stuck!!.Also this is a picture of the table display.Can you help me...
#include <iostream>
using namespace std;
const int NMBROFCLMNS = 8;
const int NMBROFROWS = 24;
void processArray(int TR[][NMBROFCLMNS]);
double avgerage(int [][NMBROFCLMNS], int, int);
int high(int TR[][NMBROFCLMNS], int, int);
int low(int [][NMBROFCLMNS], int, int);
int tempDifference(int [][NMBROFCLMNS], int , int );
void processArray(int temperatures[][NMBROFCLMNS]){
//Create the required tables
//print the table heading
std::cout << "Low / High / Average Temperature Table \n";
std::cout << "Unit" << "\t\tLow" << "\t\tHigh" << "\t\tAVG\n";
//Iterate through each clmn of the array and calculate column stats
for (int clmn = 0; clmn < 8; clmn++) {
std::cout << clmn << "\t\t"
<< low(temperatures,NMBROFROWS,clmn) << "\t\t"
<< high(temperatures,NMBROFROWS,clmn) << "\t\t"
<< avgerage(temperatures,NMBROFROWS,clmn) <<"\n";
};
//calculate and display the temp difference table
tempDifference(temperatures,NMBROFROWS,NMBROFCLMNS);
}
void printColumn(int theArray[][NMBROFCLMNS], int nmbrOfRows, int TheClmn){
//prints the values in the given column (TheClmn)
for (int row = 0; row < nmbrOfRows; row++)
std::cout << theArray[row][TheClmn] << " ";
std::cout << std::endl;
}
int low(int theArray[][NMBROFCLMNS], int nmbrOfRows, int TheClmn){
//finds the lowest value in the given column of a two-dimensional array
} //end low
int high(int theArray[][NMBROFCLMNS], int nmbrOfRows, int TheClmn){
//finds the highest value in the given column of a two-dimensional array
} //end high
double avgerage(int theArray[][NMBROFCLMNS], int nmbrOfRows, int TheClmn){
//finds the average of the values in the given column of a two-dimensional array
} //end average
int tempDifference(int theArray[][NMBROFCLMNS], int nmbrOfRows, int nmbrOfClmns){
//creates a table that contains the difference between
//each computer's temperature and the room temperature
//for each time reading. Mark all differences
//greater than or equal to 50 with an asterisk.
//Formula: differnce = theArray[row][clmn] - theArray[row][7];
} //end temperature Difference
sorry couldn't paste copy of picture here....Can you help me.