(1..100) do |i| if i * 2 == 8 and i + 1 == 5 puts "foo" elsif i + 3 == 9 puts "bar" else puts i end end