Last active
December 28, 2015 02:59
-
-
Save st98/7431302 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.upto(100) do |i| | |
puts i % 15 != 0 ? i % 3 != 0 ? i % 5 != 0 ? i : 'Buzz' : 'Fizz' : 'FizzBuzz' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment