Skip to content

Instantly share code, notes, and snippets.

@romanlehnert
Created August 18, 2014 07:45
Show Gist options
  • Save romanlehnert/9b2533cf54f1a8d5140e to your computer and use it in GitHub Desktop.
Save romanlehnert/9b2533cf54f1a8d5140e to your computer and use it in GitHub Desktop.
fizzbuzz
1.upto(100) do |i|
if i % 5 == 0 and i % 3 == 0
puts "FizzBuzz"
elsif i % 5 == 0
puts "Buzz"
elsif i % 3 == 0
puts "Fizz"
else
puts i
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment