Last active
January 15, 2017 12:06
-
-
Save takoikatakotako/f481418518f0625bdd5e2a7275da1888 to your computer and use it in GitHub Desktop.
1から100までのFizzBizz問題
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
| for num in 1..100 do | |
| #puts(num) | |
| if num%3 == 0 && num%5 == 0 then | |
| puts('Fizz Buzz') | |
| elsif num%3 == 0 then | |
| puts('Fizz') | |
| elsif num%5 == 0 | |
| puts('Buzz') | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment