Skip to content

Instantly share code, notes, and snippets.

@ainame
Created October 19, 2011 05:49
Show Gist options
  • Select an option

  • Save ainame/1297553 to your computer and use it in GitHub Desktop.

Select an option

Save ainame/1297553 to your computer and use it in GitHub Desktop.
# !/usr/bin/env ruby
101.times do |i|
if i%3 == 0 && i%5 == 0
puts "fizzbuzz"
elsif i%3 == 0
puts "fizz"
elsif i%5 == 0
puts "buzz"
else
p i
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment