cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
how to move back to the first row with n
how to move back to the first row with new column
Mar 15, 2018 at 9:06am UTC
lamyat
(1)
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;
}
}
Mar 15, 2018 at 12:51pm UTC
kbw
(9488)
Not sure what any of that means.
Please read this.
http://www.cplusplus.com/forum/beginner/1/#msg6680
Mar 15, 2018 at 2:20pm UTC
Handy Andy
(5051)
@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
Mar 15, 2018 at 2:21pm UTC
Topic archived. No new replies allowed.