Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In c++ please, using basic libraries, this chapter introduces pointers and dynamic arrays 8. Write a program that outputs a histogram of student grades for

In c++ please, using basic libraries, this chapter introduces pointers and dynamic arrays
image text in transcribed
image text in transcribed
8. 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 the 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 Then the output should be: Number of 4's: 1 Number of 20's: 2 Number of 30's: 3

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DB2 9 For Linux UNIX And Windows Advanced Database Administration Certification Certification Study Guide

Authors: Roger E. Sanders, Dwaine R Snow

1st Edition

1583470808, 978-1583470800

More Books

Students also viewed these Databases questions