Question: practice coding a program that will calculate the average grade of a student and print a summary report. The following rules apply: a student may
practice coding a program 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
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
