πŸ“Š Ruby
Q. 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
  • (C) 0 1
  • (D) 1 4
πŸ’¬ Discuss
βœ… Correct Answer: (B) 0 1 4

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
85
Total Visits
πŸ“½οΈ
2 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
99%
Success Rate