I am trying to create a rectangle with 3*5 dimension which would look like:
#####
#####
#####
I wanted to use for, and do while loop for that programming. I couldn't been able to create my desired dimension of 3*5.
Could anyone please help me out on this please. Thank you all.
//complier directives
#include<iostream>
#include<cstdlib>
using namespace std;
//main body
int main ()
{
//local identifiers
int length,width,Done;
char character,Again;
//input module
cout<<"Please enter the length and width of the rectangle seperated by a space:\n";
cin>>length>>width;
cout<<"Please enter your design character: \t";
cin>>character;
for(int i=0; i<length; i++)
{
for(int j=0; j<width; j++)
cout<<character;
cout<<endl;
}//end i loop
int i=0,j=0;
do
{
j=0;
do
{
cout << character;
}while(j++<width);
cout << endl;
}while(i++<length);
cout<<endl;
system("PAUSE");
system("CLS");
return 0;
}//end of the program
I understand that but with all information I have provided up there, Is there a way I could get rectangle with 3*5 rows column using DO WHILE please. Can anyone help me out please.. I am stuck up in the middle