Nested Loops

closed account (Gw5fjzwU)
Will someone help me find a simple code on how to display an output below using NESTED-IF

5 4 3 2 1
4 3 2 1
3 2 1
2 1
1
You wrote "nested loops" and "nested if". The "loop" and "if" are not the same thing.

Forget the "nested" for a moment. Write a loop that prints:
5
4
3
2
1

Then, replace the "print number" code with a loop that prints numbers on one line, starting with number and down to 1.

See http://www.cplusplus.com/doc/tutorial/control/
MartyBASS wrote:
Will someone help me find a simple code...
As you have a tendancy to edit your posts after you get your answer...no.
Topic archived. No new replies allowed.