Last active
September 16, 2021 14:32
-
-
Save alex-andreiev/5ec9984d4ac0ebbcd18f4ec3e7e703f1 to your computer and use it in GitHub Desktop.
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
| def fizzbuzz(n = 100) | |
| n.times{|i| i.zero? ? puts(i) : (i%3).zero? && (i%5).zero? ? puts('FizzBuzz') : (i%3).zero? ? puts('Fizz') : (i%5).zero? ? puts('Buzz') : puts(i)} | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment