πŸ“Š Ruby
Q. What is the output of the given code?
counter = 1
while counter < 11
puts counter
counter = counter + 1
end
  • (A) Prints the number from 1 to 10
  • (B) Prints the number from 1 to 11
  • (C) Prints the number from 2 to 10
  • (D) Infinite loop
πŸ’¬ Discuss
βœ… Correct Answer: (A) Prints the number from 1 to 10

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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