Question
To do: Design and implement an application that creates a histogram that allows you to visually inspect the frequency distribution of a set of values.
To do:
Design and implement an application that creates a histogram that allows you to visually inspect the frequency distribution of a set of values.
The program should generate 200 random integers in the range 1 through 100 (inclusive) and store these into an array.
Loop through the array and sort the ranges so that you can then print out the report.
Produce a chart EXACTLY like the one below that indicates how many values fell in the range 1 to 10, 11 to 20, and so on. Print one asterisk for each value entered. Notice the spacing and alignment for everything.
NOTE: There is no user input for this program.
Range # Found Chart -------- ---------- ------------------------------------------- 1 - 10 | 28 | **************************** 11 - 20 | 18 | ****************** 21 - 30 | 21 | ********************* 31 - 40 | 26 | ************************** 41 - 50 | 23 | *********************** 51 - 60 | 7 | ******* 61 - 70 | 18 | ****************** 71 - 80 | 24 | ************************ 81 - 90 | 14 | ************** 91 - 100 | 22 | **********************
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started