Asked by John
Declare Integer count
For count=1 to 3 Step 2
Display count
End For
What would the output be?
For count=1 to 3 Step 2
Display count
End For
What would the output be?
Answers
Answered by
Steve
well, just follow the loop.
On entry, count=1
next iteration: count steps up by 2, so count=3
next iteration: count=5, so exit
so, the output is
1
3
On entry, count=1
next iteration: count steps up by 2, so count=3
next iteration: count=5, so exit
so, the output is
1
3
There are no AI answers yet. The ability to request AI answers is coming soon!
Submit Your Answer
We prioritize human answers over AI answers.
If you are human, and you can answer this question, please submit your answer.