Vidyalelo
Ruby Programming · Q96

Control Structures in Ruby

Programming · Ruby Programming · question 96

Q96

What is the output of the given code? i = 3 while i > 0 do print i i -= 1 end

A.
3
B.
321
Answer
C.
Infinite loop
D.
3 2 1 0

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board