num = gets.to_i a = Array.new(num+1) {|index| index} a.delete(0) for n in a do if n % 15 == 0 puts "FizzBuzz" elsif n % 5 == 0 puts "Buzz" elsif n % 3 == 0 puts "Fizz\n" else puts n.to_s end end