Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def monthname(month)
- case month
- when "jan"
- full_month="January"
- when "feb"
- full_month="February"
- when "mar"
- full_month="March"
- when "apr"
- full_month="April"
- when "may"
- full_month="May"
- when "jun"
- full_month="June"
- when "jul"
- full_month="July"
- when "aug"
- full_month="August"
- when "sep"
- full_month="September"
- when "oct"
- full_month="October"
- when "nov"
- full_month="November"
- when "dec"
- full_month="December"
- else
- puts "Invalid abbreviation"
- end
- return full_month
- end
- puts "Enter the month abbreviation"
- a=gets.chomp()
- puts monthname(a)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement