Need Help on making a rectangle with user input using two differenct characters

Hi, I have this one assignment I am working on and I am a bit stuck here

I have to make a rectangle do this with user input:

Side size = 1
+-+
| |
| |
| |
| |
| |
| |
+-+

----------------------------------------------------------------------------

Here's what I have so far

//Draw a single line of fiver uppercase Xs using two kinds of count-controlled loops
#include <iostream>
using namespace std;

int main()
{

//Variables declared
int count1 = 1, limit = 5, count2 = 1;
char doAgain;


cout << "Enter the width for a line of Xs to be drawn on the screen: ";
cin >> limit;

count1 = 1;
cout<< '+';
while(count1 <= limit-2)
{
cout << "-";
count1++; //Loop update condition
}
cout<< '+';

cout << endl << endl;

while(count1 <= limit-2)
{
cout << " ";
count1++; //Loop update condition
}
cout<< '|';

cout << endl << endl;

while(count2 <= limit-2)
{
cout << " ";
count2++; //Loop update condition
}
cout<< '|';

cout << endl << endl;

return 0;
}

Any guidance would be useful thank you in advance :)
Topic archived. No new replies allowed.