Skip to content

Instantly share code, notes, and snippets.

@TrevorS
Created April 8, 2014 23:04
Show Gist options
  • Save TrevorS/10206281 to your computer and use it in GitHub Desktop.
Save TrevorS/10206281 to your computer and use it in GitHub Desktop.
(1..100).each do |i|
message = ""
message += "Fizz" if i % 3 == 0
message += "Buzz" if i % 5 == 0
message = i if message == ""
puts message
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment