Write a C++ program that declares and initializes an integer array of size 100 with random integers between 1 and 10 inclusive using initializeArray (from question 1) and counts the occurrence of each number in the array and graphs the information in the form of a bar chart or histogram—each number is printed, then a bar consisting of that many asterisks is printed beside the number. Here is a sample run of the program: Number Value Histogram 1 12 ************ 2 5 ***** 3 3 *** 4 16 **************** 5 7 ******* 6 6 ****** 7 9 ******** 8 1 * 9 15 *************** 10 10 **********
Write a C++ program that declares and initializes an integer array of size 100 with random
integers between 1 and 10 inclusive using initializeArray (from question 1) and counts the occurrence of each
number in the array and graphs the information in the form of a bar chart or histogram—each number is
printed, then a bar consisting of that many asterisks is printed beside the number.
Here is a sample run of the program:
Number Value Histogram
1 12 ************
2 5 *****
3 3 ***
4 16 ****************
5 7 *******
6 6 ******
7 9 ********
8 1 *
9 15 ***************
10 10 **********
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images