Question: In C++ please B. do-while loop In this lab exercise, we will practice a do-while loop. Your program needs to compute the average of grades

In C++ please In C++ please B. do-while loop In this lab exercise, we

B. do-while loop In this lab exercise, we will practice a do-while loop. Your program needs to compute the average of grades inside a do-while loop. Your program needs to check if the entered grade is in the correct range before using it for computation. If the entered grade is less than 0 or greater than 100, inform the user that the grade is incorrect and repeat the loop. You do not know how many grades the user will eventually enter. Hence, after entering each correct grade, ask the user if there is another grade to be entered. Get the user response using a character variable. If the user enters 'Y' or 'y', let the user enter another grade by repeating the loop, otherwise terminate the loop and display the average. Keep track of how many correct grades were entered so that you can compute the average. Complete the requested changes, and then save the file as Lab5B.cpp, making sure to compile and run the program to verify that it produces the correct results. Note that you will submit this file to Canvas

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!