Skip to content

Instantly share code, notes, and snippets.

@jeena
Created June 9, 2015 22:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeena/8afbbe981c804bf4947e to your computer and use it in GitHub Desktop.
Save jeena/8afbbe981c804bf4947e to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
(1..20).each do |i|
if i % 3 == 0 && i % 5 == 0
puts "FizzBuzz"
elsif i % 3 == 0
puts "Fizz"
elsif i % 5 == 0
puts "Buzz"
else
puts i
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment