Skip to content

Instantly share code, notes, and snippets.

Created September 25, 2012 11:17
Show Gist options
  • Save anonymous/9bc9804f254871f37a32 to your computer and use it in GitHub Desktop.
Save anonymous/9bc9804f254871f37a32 to your computer and use it in GitHub Desktop.
numbers = (1..100)
numbers.each do |n|
if n % 3 == 0
n = puts "Fizz"
elsif n % 5 == 0
n = puts "Buzz"
else
n
end
puts n
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment