Write a program that graphically displays a vertical bar


Question: Write a program that graphically displays a vertical bar chart. The input is an array of integers. Use the index of an array entry as the label on the X axis. The height of the bar should correspond to the value of the array entry. Scale the height proportionally so the bar chart fits on the screen. For example, if the array values are {3000, 4000, 5000}, then the bars should not be drawn 3,000; 4,000; and 5,000 pixels tall. Instead they should fit on the screen but remain in the correct proportion to the original values (e.g., perhaps 300, 400, and 500 pixels tall, but the actual values will depend upon the size of your window).

Solution Preview :

Prepared by a verified Expert
C/C++ Programming: Write a program that graphically displays a vertical bar
Reference No:- TGS02405507

Now Priced at $10 (50% Discount)

Recommended (95%)

Rated (4.7/5)