cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
need help
need help
Nov 8, 2013 at 2:40pm UTC
j2013
(20)
int num, i;
i = 0;
while (i < 3)
{
num = i+3;
for (int a = 1; a < num; a++)
cout << a * num << " ";
cout << endl;
i++;
}
how come the answer is this?
3 6
4 8 12
5 10 15 20
Nov 8, 2013 at 2:53pm UTC
LB
(13399)
Which outputs do you expect to be different?
Nov 10, 2013 at 1:10pm UTC
j2013
(20)
can explain how the code work?
Nov 10, 2013 at 1:39pm UTC
Factors
(90)
int num, i;
i = 0;
while (i < 3)
{
num = i+3;
for (int a = 1; a < num; a++)
cout << a * num << " ";
cout << endl;
i++;
}
how come the answer is this?
3 6
4 8 12
5 10 15 20
I get the feeling this is your homework.
So here's how it works.
AFALASDARW
SKKAYF
DGGH
WIMSLAGF
XGJ DGGH
HJAFL
SFV AFUJWSKW LZWF JWHWSL
Have fun ;).
Topic archived. No new replies allowed.