πŸ“Š Ruby
Q. What is output of the given code?
counter=-3
if counter<=5
puts (counter)
counter=counter+1
puts (counter)
elsif counter>5
puts (counter)
counter=2*counter
puts(counter)
end
  • (A) -3 -2
  • (B) False
  • (C) Syntax error
  • (D) None of the mentioned
πŸ’¬ Discuss
βœ… Correct Answer: (A) -3 -2

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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