Write a program that inputs a set of five student grades and outputs the GPA. GPA is computed based on the standard scale: A 4; B 3; C 2; D 1; F 0 and weighted according to the course weight. In this case you can assume that all the courses have a credit value of 3. The formula used for computation of GPA is: for each course, multiply the GP by the credit value and then add up all these products; then add up the total credit values of the courses. Divide the first sum by the second. In the case where all tea courses have equal credit rating, the GPA is just the average.
Input consists of the five grades for courses with equal credit ratings. The grades are entered from the keyboard as in the sample input below.
The output consists of the GPA for the five courses input.
A B C D E