Skip to content

Instantly share code, notes, and snippets.

@seanrclayton
Last active August 29, 2015 13:59
Show Gist options
  • Save seanrclayton/10887159 to your computer and use it in GitHub Desktop.
Save seanrclayton/10887159 to your computer and use it in GitHub Desktop.
(1..100).each do |x|
if x % 3 == 0 && x % 5 == 0
puts "Fizzbuzz"
elsif x % 3 == 0
puts "fizz"
elsif x % 5 == 0
puts "buzz"
else
puts x
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment