max = gets.to_i if max > 1 for count in 1..max do if count % 3 == 0 && count % 5 == 0 puts "fizzbuzz" elsif count % 3 == 0 puts "fizz" elsif count % 5 == 0 puts "buzz" else puts count end end else puts max end