Vidyalelo
Ruby Programming · Q70

Control Structures in Ruby

Programming · Ruby Programming · question 70

Q70

What is the output of the given code? x=3 unless x>2 puts "x is less than 2" else puts "x is greater than 2" end

A.
x is greater than 2
Answer
B.
x is less than 2
C.
3
D.
None of the mentioned

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board