πŸ“Š Ruby
Q. What is the output of given code?
counter=1
if counter<=5
puts (counter)
counter=counter+1
else
puts(counter)
counter=counter-1
end
  • (A) 1, 2
  • (B) 1,2,3,4,5
  • (C) 1 2 1
  • (D) 1 2
πŸ’¬ Discuss
βœ… Correct Answer: (D) 1 2

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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