Skip to content

Instantly share code, notes, and snippets.

@jenbo1

jenbo1/fizzbuzz.rb

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

This comment has been minimized.

Copy link
Owner Author

@jenbo1 jenbo1 commented Jul 2, 2010

My first assignment! A+

@stefanpenner

This comment has been minimized.

Copy link

@stefanpenner 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
You can’t perform that action at this time.