What will be the output for the pseudocode shown below?
1 2 3 4 |
|
1 2 3 4 5 6 7 |
|
1 2 3 4 5 6 7 |
|
1 2 3 4 5 6 7 |
|
1 2 3 4 5 6 7 |
|
Details and Assumption
-The for loop increments by unit.
-The range of the for loop includes the first and last numbers
What will be the output for the pseudocode shown below?
1 2 3 4 5 6 7 8 9 |
|
1 2 3 4 5 |
|
1 2 3 4 5 |
|
1 2 3 4 5 |
|
1 2 3 4 5 |
|
Details and Assumption
The for loop increments by unit when it starts at the lower number, and decrements by unit when it starts at the higher number.
The range of the for loop includes the first and last numbers.
What will be the output for the pseudocode shown below?
1 2 3 4 5 6 7 |
|
1 2 3 4 5 |
|
1 2 3 4 5 |
|
1 2 3 4 5 |
|
1 2 3 4 5 |
|
Details and Assumption
-The for loop increments by unit.
-The range of the for loop includes the first and last numbers