Question: 2 . ( 2 5 ) Write a program that outputs a histogram of grades for an assignment given to a class of students. The
Write a program that outputs a histogram of grades for an assignment given to a class of students. The program should input each student's grade as an integer and store the grade in a vector. Grades should be entered until the user enters" for a grade. Use a map from an int to an int to compute the histogram. The first integer in the map represents the grade and the second integer represents the number of times that grade occurred. Output the histogram to the console. Break the histogram bins into values of that is grades between are in bin call it grades between are in bin call it grades between are in bin call it etc until the highest bin for your grades. There should be no restrictions on the minimum and maximum grade for this programming project, that is the bins are not stopping at add as many as needed based on user input. A sample output for input values up to by the user is shown below: The histogram for the grades entered is: : : : : : : : : : : Use the following sequence of grades as a test input enter them one per line or separated by a space for easier entry: XO
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
