Write a program that outputs a histogram of student grades for an assignment. The program should input each student’s grade as an integer and store the grade in a vector (covered in Chapter 8). Grades should be entered until die user enters −1 for a grade. The program should then scan through the vector and compute the histogram. In computing the histogram, the minimum value of a grade is 0 but your program should determine the maximum value entered by the user. Use a dynamic array to store the histogram. Output the histogram to the console. For example, if the input is:
20
30
4
20
30
30
–1
Then the output should be:
Number of 4’s: 1
Number of 20*s: 2
Number of 30’s: 3
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.