Help with a c++ program

I was asked to do this program:

Develop a program in C++ that displays the four compartments of a blueprint of a building, according to the input data.

It must use vertical bars("|"), underscores("_"), and blank spaces (" "), to draw the compartments.

Each compartment is characterized by two integer values​​: the height (Y axis) and the width (X axis). These values ​​will be given by user and thus corresponds to the input data.

The compartments are considered in the order in which they are received by
program. The compartment 1 and 2 make up track 1. The track 2 is composed by the compartment 3 and 4. In track 1, the first compartment must have a height equal to or greater than the next.

Example:
Input--> 2 3 1 2 2 2 1

This input identifies the following information about the compartments:

Track 1
Compartment 1: Width (2); Height (3).
Compartment 2: Width (1); Height (2).

Track 2
Compartment 3: Width (2); Height (2).
Compartment 4: Width (2); Height (1).

consider the "0" as blanck spaces
___ _
|000|0|
|000|_|
|___|___
|000|___|
|___|

Please help me!
Last edited on
What have you done so far? Because we won't do your homework for you, but if you pose specific questions about specific parts of the assignment, then we will help.

Show the code you have so far and then explain the part you are having trouble with.
Topic archived. No new replies allowed.