Created
June 4, 2010 01:47
-
-
Save jah2488/424797 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 fizzbizz(num) | |
x = 1 | |
while x < num do | |
if ((x%5==0) && (x%3==0)) | |
puts "FizzBizz" | |
elsif (x%5==0) | |
puts "Bizz" | |
elsif (x%3==0) | |
puts "Fizz" | |
else | |
puts x | |
end | |
x+=1 | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment