Created
May 18, 2015 13:24
-
-
Save RedSoxFan22/47e946a0c9d3948f8e2c to your computer and use it in GitHub Desktop.
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
def fizzbuzz (num) | |
if num % 3 == 0 | |
p "Fizz" | |
elsif num % 5 | |
p "Buzz" | |
elsif num % 3 == 0 && num % 5 == 0 | |
p "FizzBuzz" | |
else | |
return num | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment