Question: (((c++ ))) Grade Point Average Write a program that reads the number of courses N taken by a student. The program reads the grade and
Grade Point Average Write a program that reads the number of courses N taken by a student. The program reads the grade and the credit hours for N courses. The program calculates and prints the student grade-point average GPA. The grades are represented by 4 as the weight of A, by 3 as the weight of B, by 2 as the weight of C, by 1 as the weight of D, and by 0 as the weight of F. GPA = sum(credit * weight) / sum(credit) The GPA of the below input/output sample is: GPA = (3 * 3+3 * 4+4* 2+2 *1)/(3 +3 +4 + 2) = 2.58333 Sample inputs / outputs: Enter the number of courses: 4 Enter the grade and credit of course number 1: B 3 Enter the grade and credit of course number 2: A3 Enter the grade and credit of course number 3: C4 Enter the grade and credit of course number 4: D 2 The student GPA is 2.58333
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
