Question: Ques) Write a program in c, which meets the following requirements. Requirements 1. Read integer values from stdin, separated by one or more spaces or

Ques) Write a program in c, which meets the following requirements.

Ques) Write a program in c, which meets the following requirements. Requirements1. Read integer values from stdin, separated by one or more spaces

Requirements 1. Read integer values from stdin, separated by one or more spaces or newlines, until reaching EOF 2. The input is guaranteed to be well-formed. 3. The input contains no more than 80 values. 4. on standard output, render a simple vertical column graph representation of the input values, in order left to right, using hash'#' characters as shown in the examples below. The number of hashes printed in each column should be equal to the corresponding input value 5. The area above a completed column should be filled with space characters 6. Ignore empty lines. Do not output a column for an empty line 7. The entire graph must end with a newline character Guide Hint: you may find it helpful to draw your graphs upside down (increasing down the screen) first, then change your code to flip the output it up the right way Examples 1. Input: 11 3 1 Output The requirements mean that the graph fills a rectangular area with hashes and spaces, so this example is printed as In particular, notice the spaces before the newlines on the first two lines. They are necessary. 2. Input: 3 4 5 Output 3. Input: 0 304 5 Output Notice the empty columns that correspond to the zeros in the input, including the leading zero 4. Input 15 16 15 12 12 12 3 19 21 17 15 12 10 Output 5. Input 2 Output

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!