Question: Using c++ Exercise #3: GPA of a Student Write a program that prompts the user to enter a student name, and m the numbers of
Exercise #3: GPA of a Student Write a program that prompts the user to enter a student name, and m the numbers of courses the student studied. The program then reads the code, the grade, and the credit for each of the m courses and ccalculates and prints the student's GPA using the following formula GPA- C1 + C2 + + Cm Were W stands for the weight of the course grade A is 4, B is 3, C is 2, D is 1, and F is 0. C stands for the number of credits for each course. The program should validate whether the grade is a valid grade or not Sample input / output: nter the student name: Ali Omar nter the number of courses: 5 nter the code, grade, and credit for course number 1: 141111A 3 nter the code, grade, and credit for course number 2: 1411116 X 4 nvalid grade! nter the code, grade, and credit for course number 2: 1411116 c 4 nter the code, grade, and credit for course number 3: 1411211 D 3 nter the code, grade, and credit for course number 4: 1411215 C 3 nter the code, grade, and credit for course number 5: 1411341 B3 GPA of the 5 courses is: 2.375 li Omar studied the following 5 courses: Code Grade Credit 141111 1411116 1411211 1411215 411341
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
