Q. What is the output of the given code?
i = 0
while i < 5
puts i
i=(i+1)**2
end
i = 0
while i < 5
puts i
i=(i+1)**2
end
β
Correct Answer: (B)
0 1 4
You must be Logged in to update hint/solution