Vidyalelo
Ruby Programming · Q93

Control Structures in Ruby

Programming · Ruby Programming · question 93

Q93

What is the output of the given code? i = 0 while i < 5 puts i i=(i+1)**2 end

A.
1 2 3 4 5
B.
0 1 4
Answer
C.
0 1
D.
1 4

Answer: Option B

Solution

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