Ask your own question, for FREE!
Computer Science 16 Online
OpenStudy (anonymous):

How do you write a program using nested loops to produce: 1 2 3 4 5

OpenStudy (anonymous):

for (i=1; i < 6; i++){ for (j = 6-i; j > 0; j--){ printf(" "); } printf("%d", i); } That should do it. :)

OpenStudy (anonymous):

Correction: the second printf statement should read 'printf("%d\n", i);' and not just 'printf("%d", i);'. :)

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!