Question: Write a program that keeps asking the user to enter students' grades until he enters -1, then your program should display how many entered grades

 Write a program that keeps asking the user to enter students'

Write a program that keeps asking the user to enter students' grades until he enters -1, then your program should display how many entered grades and the average of these grades. Your program should only accept grades between 0 and 100, any other value is not counted. Here is an example of the expected output: Please enter grade 1 (or - 1 to exit): 85.5 Please enter grade 2 (or - 1 to exit): 77.5 Please enter grade 3 (or - 1 to exit): 105 Incorrect input. Please enter grade 3 (or - 1 to exit): 95 Please enter grade 4 (or - l to exit): - 1 You entered 3 valid grades. The average is 86

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!