Skip to content

Instantly share code, notes, and snippets.

@jenbo1
Created July 2, 2010 03:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jenbo1/460907 to your computer and use it in GitHub Desktop.
Save jenbo1/460907 to your computer and use it in GitHub Desktop.
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

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