Subject:Computer SciencePrice: Bought3
Hello. I'm trying to figure out the question below in C code.
Ask the user for ratings for a professor in a loop. The ratings can go from 0 to 100. Allow the user to keep entering ratings, until they type in -1. Store these ratings in an appropriate array.
Once the user is done entering values, print how how many of each rating a professor has. Show the highest ratings first, and do not show ratings that weren't given. Also print out the total number of ratings and the average.
Hint: Declare a grades array of size 101. Initialize all cells to zero. Ask the user for a rating (and if valid) increment the corresponding cell of your grades array. When you print out the ratings in the end, only print the non-zero ratings.