Created
February 1, 2012 20:14
-
-
Save freeformz/1719056 to your computer and use it in GitHub Desktop.
FizzBuzz
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Looking for creative FizzBuzziness..... | |
One per file, all languages accepted. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Here's a pretty basic one, no interesting here really. | |
1.upto(100) { |i| puts (i % 3) == 0 ? (i % 5) == 0 ? "FizzBuzz" : "Fizz" : (i % 5) == 0 ? "Buzz" : i } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment