Question: C++ Practice 1: Histogram Chapter 5 Prob. Generate a text-based histogram for a quiz given to a class of students. The quiz is graded on
Practice 1: Histogram Chapter 5 Prob. Generate a text-based histogram for a quiz given to a class of students. The quiz is graded on a scale from 0 5. Write a program that allows the user to enter grades for each student. . As the grades are being entered the program should count, using an array, the number of O's, the number of 1's, the number of 2's, the number of 3's, the number of 4's, and the number of 5's. The program should be capable of handling an arbitrary number of student grades. Practice 1: Histogram (cont.) Output the histogram count at the end. For example, if the input grades are: 3,0,1,3,3,5,5,4,5,4 then the program should output 1 grade(s) of 0, 1 grade(s) of 1, 0 grade(s) of 2, - 3 grade(s) of 3, 2 grade(s) of 4, 3 grade(s) of 5 [Hint] You can do this by making an array of size 6 where each array element is initialized to zero. Whenever a zero is entered, increment array(0). Whenever a one is entered, increment array(1), etc. up to array
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
