Skip to content

Instantly share code, notes, and snippets.

@chaslemley
Created October 31, 2011 01:42
Show Gist options
  • Save chaslemley/1326713 to your computer and use it in GitHub Desktop.
Save chaslemley/1326713 to your computer and use it in GitHub Desktop.
(1..100).each do |num|
str = ""
str << "Fizz" if num % 3 == 0
str << "Buzz" if num % 5 == 0
str = num if str.empty?
print str
print ", " if num < 100
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment