Print to the screen the following sequence, namely 1, 2, 3, 4, 5, 1, 2, 3, 4, 1, 2, 3, 1, 2, 1.
I know I need to use a nested loop, can someone give me a hand with that?
Last edited on
Start with a single loop that produces: 5,4,3,2,1.
5,4,3,2,1 or 1,2,3,4,5?
Last edited on
Am I getting warmer? lol, I'm so lost.
1 2 3 4 5 6 7 8 9 10 11
|
for (i=1; i<=5; i++)
{
for (i=1; i<=4; i++)
{
for (i=1; i<=3; i++)
{
for (i=1; i<=2; i++)
{
for (i=1; i<=1; i++)
|
Last edited on