Use of Single-dimension Arrays Write a program that will store 200 integer values in a single-dimension array. The values stored in the array must be randomly generated by the program and be in the range of 1 to 10. The program will: a. Display to the monitor all integer values in table format of 10 rows and 20 columns. b. Calculate and display the total sum of the numbers stored in the array. c. Calculate and display the final average of the numbers stored in the array. d. The number of times each value stored in the array occurred. There are several ways to do this step; and you're allowed to create a second array for this part if it helps. e. Displays a histogram of the value occurrences. The following sample output is for 60 random integers values generated by the computer: 4 10 79 52239 9 10 7 10 The sum of all values is: 345 The average is: 5.75 Occurrence of each value. 1 appeared The value The value The value The value The value The value The value The value 2 appeared 3 appeared 4 appeared 5 appeared 6 appeared 7 appeared & appeared The value 9 appeared The value 10 appeared lue 5: alue 7: Value 8: Value 9: Value 10: 6 times. 3 times. 5 times. 7 times. 1 times. 8 times. 7 times. 9 times. 6 times. 1 10 Process returned (exe) execution time: 0.048 s Press any key to continue.
Write a program that will store 200 integer values in a single-dimension array. The values stored in the
array must be randomly generated by the program and be in the range of 1 to 10. The program will:
a. Display to the monitor all integer values in table format of 10 rows and 20 columns.
b. Calculate and display the total sum of the numbers stored in the array.
c. Calculate and display the final average of the numbers stored in the array.
d. The number of times each value stored in the array occurred. There are several ways to do
this step; and you're allowed to create a second array for this part if it helps.
e. Displays a histogram of the value occurrences.
I am stuck on d and e attache is the Hw file and how far i got in the code.
![# Use of Single-dimension Arrays
## Objective
Develop a program that stores 200 integer values in a single-dimension array. The array values should be generated randomly within the range of 1 to 10. The program will execute the following tasks:
### Tasks:
1. **Display Values**
- Show all integer values in a table format with 10 rows and 20 columns.
2. **Calculate Sum**
- Compute and display the total sum of the numbers in the array.
3. **Calculate Average**
- Compute and display the final average of the numbers stored in the array.
4. **Count Occurrences**
- Determine and display how many times each value appears in the array. Multiple methods exist for accomplishing this task; using a secondary array is permissible if beneficial.
5. **Histogram Display**
- Present a histogram showing the frequency of each value.
### Sample Output:
The sample output illustrates the program's execution for 60 random integers.
- **Values Generated:**
```
6 5 2 9 1 1 6 7 9 7 1 9 3 9 7 8 4 8 3 1
7 10 10 8 8 6 8 10 8 7 9 2 2 7 7 4 7 7 10 5
6 2 4 9 4 8 7 1 6 5 6 9 8 6 5 4 1 5 6 9
```
- **Sum and Average:**
```
The sum of all values is: 345
The average is: 5.75
```
- **Occurrence of Each Value:**
```
The value 1 appeared 6 times.
The value 2 appeared 4 times.
The value 3 appeared 2 times.
The value 4 appeared 6 times.
The value 5 appeared 4 times.
The value 6 appeared 8 times.
The value 7 appeared 9 times.
The value 8 appeared 8 times.
The value 9 appeared 7 times.
The value 10 appeared 6 times.
```
- **Histogram:**
```
Value 1 : ******](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F0861d444-2540-428c-80bb-c7cdc7cbe35e%2F2cc06d77-83f7-4026-8037-16e56176a6cf%2F9jvyda_processed.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 3 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)