Created
June 9, 2013 22:31
-
-
Save surrealdetective/5745541 to your computer and use it in GitHub Desktop.
a fizzbuzz solution
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
count = 1 | |
fizz = [] | |
buzz = [] | |
fizzbuzz = [] | |
while count <= 50 | |
fizzbuzz.push(count) if count%3 == 0 && count%5 == 0 | |
fizz.push(count) if count%5 == 0 | |
buzz.push(count) if count%3 == 0 | |
count +=1 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment