Created
September 23, 2014 01:07
-
-
Save acrookston/a3e8e263c9e6eb083968 to your computer and use it in GitHub Desktop.
Cross-posting my FizzBuzz challenge from Forrst: http://zurb.com/forrst/posts/FizzBuzz-R33
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
(1..100).each{|i| puts (i%3==0?'Fizz': '')+(i%5==0?'Buzz': '')+(i%3==0||i%5==0?'': i.to_s)} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Basic compression:
I don't actually know Ruby but it seems to work.