Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Your professor has asked you to write a C++ program that determines grades for f

ID: 3642714 • Letter: Y

Question

Your professor has asked you to write a C++ program that determines grades for five students at the end of the semester. For each student, identified by an integer number, four exam grades must be kept, and two final grade averages must be computed. The first grade average is simply the average of all four grades. The second grade average is computed by weighting the four grades as follows: The first grade gets a weight of 0.2, the second grade gets a weight of 0.3, and the fourth grade gets a weight of 0.2.

That is, the final grade is computed as follows:

0.2 * grade1 0.3 * grade2 0.3 * grade 3 0.2 * grade4


Using this information, construct a 5-by-6 two dimensional array, in which the first column is used for the student number, the next four columns for the grades, and the last two columns for the computed final grades. The program's output should be a display of the data in the completed array. For testing purproses, the professor has provided the following data:

Explanation / Answer

#include #include using namespace std; void main(){ int scores[5][7]; for(int i=0;i