a. Using a do-while statement, write, compile, and run a C++ program to accept
a grade. The program should request a grade continuously as long as an invalid grade is
entered. An invalid grade is any grade less than 0 or greater than 100. After a valid grade has
been entered, your program should display the value of the grade entered.
b. Modify the program written for Exercise 1a so that the user is alerted when an invalid grade
has been entered.
c. Modify the program written for Exercise 1b so that it allows the user to exit the program by
entering the number 999.
d. Modify the program written for Exercise 1b so that it automatically terminates after five
invalid grades are entered.
The answer to the question is available in the PDF file https://www.assignmentexpert.com/https://www.assignmentexpert.com/homework-answers/programming-answer-58089.pdf
Comments
Leave a comment