Created
April 12, 2012 11:27
-
-
Save STAR-ZERO/2366628 to your computer and use it in GitHub Desktop.
Rubyで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 {|i| | |
if i % 15 == 0 then | |
p "Fizz Buzz" | |
elsif i % 5 == 0 then | |
p "Buzz" | |
elsif i % 3 == 0 then | |
p "Fizz" | |
else | |
p i | |
end | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment