Created
June 24, 2013 03:03
-
-
Save finsterthecat/5847511 to your computer and use it in GitHub Desktop.
Now, am I hired or what?
This file contains hidden or 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.upto(100).each do |x| | |
s = "" | |
s+= 'fizz' if (x % 3 == 0) | |
s += 'buzz' if (x % 5 == 0) | |
s = x.to_s if (s.empty?); | |
puts s | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment