Last active
August 29, 2015 14:02
-
-
Save bomatson/50c075bb550e361c50ca 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 check_for_fizz(input) | |
if (input % 15 == 0) | |
"FizzBuzz" | |
elsif (input % 5 == 0) | |
"Buzz" | |
elsif (input % 3 == 0) | |
"Fizz" | |
else | |
input | |
end | |
end | |
(1..100).each do |input| | |
puts check_for_fizz(input) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment