# 入力された値を文字列で受け取る str = gets.chomp month = str.to_i if [3, 4, 5].include? month puts "spring" elsif [6, 7, 8].include? month puts "summer" elsif [9, 10, 11].include? month puts "fall" elsif [12, 1, 2].include? month puts "winter" end