My question is:
(In C Language)
Write a C program that asks the user to enter exam results (0-100) until a sentinel value is entered.After each exam result, the corresponding letter grade is shown (<50 – F, 50-69 –D, 70-79 – C, 80-89– B, 90-100 – A). At the end, the average of the exam result and the grading point average (A = 4.0, B= 3.0, C = 2.0, D = 1.0, F = 0) is shown. Assume that credit of every course is 4.
Use do...while loop.Please check the sample run of question 2 above.
The question 2 was like this:
2. Write a C program that asks the user to enter exam results (0-100) until a sentinel value is entered.After each exam result, the corresponding letter grade is shown (<50 – F, 50-69 –D, 70-79 – C, 80-89–B, 90-100 – A).
At the end, the average of the exam result and the grading point average (A = 4.0, B =3.0, C = 2.0, D = 1.0, F = 0) is shown.
Assume that credit of every course is 4. Use while loop.
How to calculate gpa?Assume that the following grades are entered: A,C,B,DGPA= (4.0*4+2.0*4+3.0*4+1.0*4)/16 (SUM OF CREDITS)=2.5Sample Run:Enter grade: BEnter grade: CEnter grade: AEnter grade: AEnter grade: DEnter grade: -1Youe gpa is 2.8