πŸ“Š Ruby
Q. What is the output of the given code?
a=10
b=2
if a>b
a=a*b
puts (a)
elsif a<b
a=a*a+b
puts (a)
else
a=a-b
puts (a)
end
  • (A) 20
  • (B) x is less than 2
  • (C) -98
  • (D) None of the mentioned
πŸ’¬ Discuss
βœ… Correct Answer: (A) 20

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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