student grade solution




Write a program that reads in a set of student grade values and then calculates and displays statistics for those grades. Your program must be able to handle up to fifty (50) different grade values. Your program will determine the following statistics for the set of student grade values:




Mean (Average)

Letter Grade Counts

Success Rate

You should validate user input to ensure that grade values are in the range from 0 to 100. Your program should prompt the user repeatedly for input until the user enters the sentinel value or the limit of 50 values has been reached. Treat the value 999 as the sentinel value to end the input phase of the program. Be sure to tell your user what value will be treated as the sentinel value. Count and report the number of “A’s”, “B’s”, “C’s”, “D’s”, and “F’s”. Use a grade of 90 or above for an “A”, a grade of 80 or above but less than 90 for a “B”, a grade of 70 or above but less than 80 for a “C”, and a grade of 60 or above but less than 70 for a “D”. Grades that are less than 60 are considered to be a letter grade of “F”. The Success Rate is the number of students who earned a grade of 70 or above divided by the total number of students expressed as a percentage. For example, if 25 out of 32 students earned 70 or greater, the Success Rate would be 25 / 32 or 0.78125. Expressed as a percentage the Success Rate would look like 78.125%.