Question: #include #include using namespace std; int main() { const int rows = 2, cols = 5; double grades[rows][cols]; int i, j; //Get values for (i

#include
#include
using namespace std;
int main()
{
const int rows = 2, cols = 5;
double grades[rows][cols];
int i, j;
//Get values
for (i = 0; i
{
for (j = 0; j
{
cout
cin >> grades[i][j];
}
}
//Find the highest
double highest = grades[0][0];
for (i = 0; i
{
for (j = 0; j
{
if (grades[i][j] > highest)
highest = grades[i][j];
}
}
//Find the lowest
double lowest = grades[0][0];
for (i = 0; i
{
for (j = 0; j
{
if (grades[i][j]
lowest = grades[i][j];
}
}
//Find the average
double total = 0.0;
double average;
for (i = 0; i
{
for (j = 0; j
{
total += grades[i][j];
}
}
average = total / (rows * cols);
cout
cout
return 0;
}
USE THIS WHILE WRITING
void getGrades(double[][cols], int, int);
double findHighest(double[][cols], int, int);
double findLowest(double[][cols], int, int);
double findAverage(double[][cols], int, int);
C++ The following program calculates the highest, the lowest, and the average grade for a class of multiple students and multiple test. This program calculates and display the highest, the lowest, and the average grade for this class. Run this program. See the results. Now, help me modify it so that it will display which student and which test the highest scores and the lowest scores were obtained. Display the results showing that for example, Student #4 had recieved the highest grade of 99 in the 2nd test and student #5 has scored the least score of 32 in the 4th test. USE ARRAYS PLEASE
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
