Created
April 15, 2016 10:13
-
-
Save yoshitokamizato/4be9dcc5e071239f8fa1a9f27a161e26 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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