Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

6. One interesting application of computers is the drawing of graphs and bar charts (sometimes called histograms). Write a modular program that performs the following:

6. One interesting application of computers is the drawing of graphs and bar charts (sometimes called "histograms"). Write a modular program that performs the following: (25 points) a. Take a user input representing a number of positive integer values (n) that the program will process. This number (n) should be greater than 0 and not more than 20. b. Draw a header for the results, as shown in the example below. c. Take each positive integer value one by one to print a line containing the read value (on two positions), followed by a space and then a number of adjacent '#'s equal to the integer read value. Each entered integer value should be greater than 0 and not more than 15. d. Print a footer showing some statistical results: the average of the (n) entered values (rounded to the nearest integer), the highest value, the lowest value, and the number of values below 5. e. The following is just an example of the program output for n = 10 and the values entered one by one for processing are 5, 10, 2, 7, 7, 15, 9, 3, 12, and 2. ============================= Number of Values: 10 Results: ------------------------------------------------- 5 ##### 10 ########## 2 ## 7 ####### 7 ####### 15 ############### 9 ######### 3 ### 12 ############ 2 ## ------------------------------------------------- Average = 7 Highest Value = 15 Lowest Value = 2 Number of Values Below 5 = 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

Step: 3

blur-text-image

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

Data And Databases

Authors: Jeff Mapua

1st Edition

1978502257, 978-1978502253

More Books

Students also viewed these Databases questions

Question

Prepare a short profile of Henry words worth Longfellow?

Answered: 1 week ago

Question

What is RAM as far as telecommunication is concerned?

Answered: 1 week ago

Question

Question 1: What is reproductive system? Question 2: What is Semen?

Answered: 1 week ago

Question

Describe the sources of long term financing.

Answered: 1 week ago