- If you’re climbing steps from one level to the next level, you can choose the increment based on how many steps you take at a time.
- You can choose to go up the stairs one step at a time:
for(int i = 0; i<100; i++)
- You can choose to go up the stairs two steps at a time:
for(int i=0; i<100; i = i + 2)
- Or, to represent going down the stairs one step at a time:
for(int i=100; i>0 i--)