Skip to content

Instantly share code, notes, and snippets.

@yoshitokamizato
Created April 15, 2016 10:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yoshitokamizato/4be9dcc5e071239f8fa1a9f27a161e26 to your computer and use it in GitHub Desktop.
Save yoshitokamizato/4be9dcc5e071239f8fa1a9f27a161e26 to your computer and use it in GitHub Desktop.
puts("月を数値で入力してください。")
month = gets.to_i
case month
when 1,2,12
puts("#{month}月は冬ですね。")
when 3,4,5
puts("#{month}月は春ですね。")
when 6,7,8
puts("#{month}月は夏ですね。")
when 9,10,11
puts("#{month}月は秋ですね。")
else
puts("そんな月はないですよ?")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment