CS2141 Program One

Due: Friday, 21 May 2010, at 11:59pm

For this first assignment you are to create an "ASCII art" program which displays a variation of the same shape given different input values. To receive full credit, you must use all of the listed components in your program.

The point of this assignment is to get used to the basic components of C++, practice using the submit program and to get used to the required coding style.

Details

Input

The input will be read from the terminal using cin:

int a;
cin >> a;

If multiple, whitespace separated numbers are supplied at once, >> will give them to you one at a time. No fancy parsing is necessary.

To make it easier to test your program you can also put all the input in a file and pipe the file to the program (the program will treat the contents of the file as if it was typed on the keyboard). This way you don't have to type the test data every time you want to test your application. If the test data was put in "prog1.test" you can run your program like this:

./prog1 < prog1.test

The format of the input will be as follows:

Example input

5 4 9 1 2 50 0

Output

The output of the program is your creation. It must follow these simple rules:
Here is an example of how a diagram should scale. Use something other than this example in your program:
Input
1
     
Output

/---\
|.0.|
|..0|
|000|
\---/
     
Input

3
     
Output
///---------\\\
///---------\\\
///---------\\\
|||...000...|||
|||...000...|||
|||...000...|||
|||......000|||
|||......000|||
|||......000|||
|||000000000|||
|||000000000|||
|||000000000|||
\\\---------///
\\\---------///
\\\---------///
     

Additional Requirements

In addition to the output requirements above, your program must also follow these guidelines:

Hopefully Helpful Hints

Have fun, and remember that all the usual rules regarding cheating and cooperation are in full effect for this program.

This page last updated 12 May 2010