M
Q. What is the output of the given code?
string = gets.chomp
case string
when string = "a"
print "alphabet a"
when string = "b"
print "alphabet b"
when string = "c"
print "alphabet c"
else
print "some other alphabet"
end
- Correct Answer - Option(B)
- Views: 65
- Filed under category Ruby
Discusssion
Login to discuss.