Skip to content

Instantly share code, notes, and snippets.

@gaurish
Created August 3, 2012 21:33
Show Gist options
  • Select an option

  • Save gaurish/3251742 to your computer and use it in GitHub Desktop.

Select an option

Save gaurish/3251742 to your computer and use it in GitHub Desktop.
(1..100).each do |i|
if i%3 == 0 and i%5 == 0 then puts "FizzBuzz"
elsif i%3 == 0 then puts "Fizz"
elsif i%5 == 0 then 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