Question: Practice writing a program in c++ that will calculate the average grade of a student and print a summary report. The following rules apply: a

Practice writing a program in c++ that will calculate the average grade of a student and print a summary report.

The following rules apply:

a student may sign up for any number of courses;

during a course, the student may receive any number of grades;

grades are integer numbers in the range [1..5];

the final grade for a course is the arithmetic mean of all grades received during the course;

the overall final grade is the arithmetic mean of the final grades received for all the courses the student has taken.

All floating-point numbers printed by the program should be limited to two decimal points. The input is given in the following form:

C

N1 G11 G12 .. G1n

N2 G21 G22 .. G2n

.

.

Nc Gc1 Gc2 .. Gcn

Where:

C number of courses taken by the student

Nx number of grades received during course number x

Gab b-th grade received in course number a

Example input

3

4 2 3 4 5

2 4 5

3 4 4 5

Example output

Course 1: final 3.50, grades: 2 3 4 5

Course 2: final 4.50, grades: 4 5

Course 3: final 4.33, grades: 4 3 5

Overall final 4.11

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!