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
for loop for aaaa and next line is b
for loop for aaaa and next line is b
Sep 30, 2016 at 12:35pm UTC
keima
(1)
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 UTC
SamuelAdams
(1535)
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 UTC
Topic archived. No new replies allowed.