how to move back to the first row with new column

qs:
I'm writing a function that draw a picture.
i need to make the function called that is printed in a row.
i've made the function called printed in column.
how shoould i change the function such that the functions called are printed horizontally.

[code]
void pattern0()
{
for(int r=0; r<4 ; r++)
{
for(int c=0; c<4; c++)
{
if(r>=c)
cout << '*';
else
cout << ' ';
}
cout <<endl;
}


}
Not sure what any of that means.

Please read this.
http://www.cplusplus.com/forum/beginner/1/#msg6680
@kbw,

As I understand it this output
*
**
***
****
*****

needs to rotate 90 degrees, I am thinking to the left. So far the for loops I have tried not work yet.

Andy

Edit:
Last edited on
Topic archived. No new replies allowed.