num = gets.to_i #カウント変数 i = 1 while i <= num if i % 15 == 0 puts "FizzBuzz" elsif i % 3 == 0 puts "Fizz" elsif i % 5 == 0 puts "Buzz" else puts i end i += 1 end