Discussion Forum : Mathematic Operations And Loops
Question - What is the output of the given code?i = 3while i > 0 do  print i  i -= 1end
Options:
A .  3
B .  321
C .  Infinite loop
D .  3 2 1 0
Answer: Option B


The do statement here indicates that till the while condition is true execute the instructions.
Output:
321



Was this answer helpful ?
Next Question
Submit Your Solution hear:

Your email address will not be published. Required fields are marked *