|
-
March 23rd, 2010, 10:40 PM
#3
Re: Outputing a square.
void display()
{
char ch;
int i, j, side;
cout<<"Enter character and side"<<endl;
cin>>ch>>side;
cout<<endl;
for(int i=0; i<side/2; i++)
{
for(int j=0; j<side/2; j++)
{
cout<<ch;
}
cout<<endl;
}
}
I don't know why you are doing side/2. I think it should just simply be side.
Last edited by sgsawant; March 23rd, 2010 at 10:43 PM.
Reason: I clicked submit accidentally.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|