Bar Chart Lab Project


This project has a two-fold goal. First, the goal is to print a horizontal bar chart. Second, the goal will be to print the a vertical bar graph.


Part One:
The program will read 6 integers from input that will correspond to the length of the 6 bars printed by the program. All bars are to be 4 lines thick. Print each bar with "#" signs.

Sample output:
if you read in : 8 4 7 15 3 12

you see:

horizontal bars -- part one

Do you need the text version, instead?

Back to the Top of this Page


Part Two:

Do the same program as in part one, but make these changes:

Sample output:
if you read in : 8 4 7 15 3 12 (for the six bars)
and then read in : 6 (for thickness)

you see:

horizontal bars -- part two

Do you need the text version, instead?

Back to the Top of this Page


Part Three:

Do a the same program as in Part One but make VERTICAL bars instead of horizontal ones. This means: The program will read 6 integers from input that will correspond to the length of the 6 bars printed by the program. All bars are to be 5 characters thick.

Sample output:
if you read in : 8 4 7 15 3 12

you see:

vertical bars -- part three

Do you need the text version, instead?

Back to the Top of this Page


Part Four:

Do a the same program as in Part THREE but make these changes:

Sample output:
if you read in : 8 4 7 15 3 12

you see:

vertical bars -- part four

Do you need the text version, instead?

Back to the Top of this Page


Back to the Top of this page


[Back to the Index]

graphics images Copyright 1998-2003 Elizabeth Fraley HTML code copyright 1998-2003 Elizabeth Fraley. Permission is given to provide these pages in their original, unaltered form online for educational purposes. They may not be republished or included on a CDROM, disk or other media or with any published work without the express permission of the copyright holder (this includes FAQ books).