Question
IN JAVA Your program should prompt the user for a grade and then check if the entered grade is in a correct range before using
IN JAVA Your program should prompt the user for a grade and then check if the entered grade is in a 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 without checking if they want to enter another number. You do not know how many grades the user will eventually enter, so after entering each correct grade, ask the user if there is another grade to be entered. Obtain the users 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. Be sure to keep track of how many correct grades were entered so that you can compute the average.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started