Examveda

What is the output of the given code?
x=7
   y=9
   if x==y
   print "equal"
   elsif x>y
   print "greater" 
   else
   print "less"
   end

A. equal

B. greater

C. less

D. none of the mentioned

Answer: Option C


This Question Belongs to Ruby Programming >> Control Structures In Ruby

Join The Discussion

Related Questions on Control Structures in Ruby