Q. What is the output of the given code?
length=gets.chomp
case length.length
when length=4
print "length is 4"
when length=5
print "length is 5"
end
length=gets.chomp
case length.length
when length=4
print "length is 4"
when length=5
print "length is 5"
end
β
Correct Answer: (A)
ruby
length is 4