for loop for aaaa and next line is b

Sep 30, 2016 at 12:35pm
I'm just getting started at for loop, what is the simple program for an output of:
aaaa
b
b
b
b

..please help me with this

thanks
Sep 30, 2016 at 12:41pm
Assuming you want to print one char at a time, your going to have to use 2 loops.
one for the across and one for the down.
The only difference in the loops is the down one will use a new line or << endl; after you print the char.

http://lmgtfy.com/?q=C%2B%2B+for+loop
Last edited on Sep 30, 2016 at 12:42pm
Topic archived. No new replies allowed.