Question: C++ The following C++ program is a slightly modified version of Program 5.20 of your Bronson textbook. In this program, the average of three grades

C++  C++ The following C++ program is a slightly modified version of

The following C++ program is a slightly modified version of Program 5.20 of your Bronson textbook. In this program, the average of three grades of each student for a class of four students is computed and displayed. You need to modify the code as follows: 1. The variable "double grade" should be replaced by a two-dimensional array variable "double grade[NUMSTUDENTSI[NUMGRADES]." Also replace the variable "double average" by "double average[NUMSTUDENTs]." 2. After completing the display of the average grade of all students, your program should compute the class average (i.e., the average of four students' average grades) and display 3. Determine and display the class standard deviation by subtracting the class average from each student's average grade (that results in a set of new numbers, each called a deviation) squaring each deviation; adding the squared deviations; dividing the sum by the number of students, NUMSTUDENTS and taking its square root. #include "stdafx.h" #include using namespace std; int main ) const int NUMGRADES = 3; const int NUMSTUDENTS = 4; int i,j double grade, total, average: for (1-0; > grade: total+-grade // add the grade into the total // end of the inner for loop /1 calculate the average average -total / NUMGRADES cout

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!