Created
February 3, 2013 19:04
-
-
Save DavidBechtel/4703181 to your computer and use it in GitHub Desktop.
FizzBuzz application written in R
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
FizzBuzz <- function(M) | |
{ | |
for (intL in 1:M) | |
{ | |
if (intL %% 15 == 0) print("FizzBuzz") | |
else | |
if (intL %% 5 == 0) print("Buzz") | |
else | |
if (intL %% 3 == 0) print("Fizz") | |
else | |
print(intL) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment