#! ruby N = gets.to_i (1..N).each do |i| i3 = i % 3 == 0 i5 = i % 5 == 0 i3a5 = i3 & i5 case when i3a5 puts "FizzBuzz" when i3 puts "Fizz" when i5 puts "Buzz" else puts i end end