Skip to content

Instantly share code, notes, and snippets.

@jenbo1
Created Jul 2, 2010
Embed
What would you like to do?
Fizz Buzz!
1.upto(100) do |n|
if n % 3 == 0
print "fizz"
end
if n % 5 == 0
print "buzz"
end
if n % 3 != 0 and n % 5 != 0
print n
end
puts
end
@jenbo1
Copy link
Author

jenbo1 commented Jul 2, 2010

My first assignment! A+

@stefanpenner
Copy link

stefanpenner commented Jul 23, 2010

55 characters :P totally terrible quality but... https://gist.github.com/044466075ddd2ffb3307

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment