Created
August 21, 2013 22:45
-
-
Save radavis/6301193 to your computer and use it in GitHub Desktop.
Fun times with 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
(1..100).each do |i| | |
print 'Fizz' if i % 3 == 0 | |
print 'Buzz'if i % 5 == 0 | |
print i if i % 3 != 0 and i % 5 != 0 | |
puts | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment