Skip to content

Instantly share code, notes, and snippets.

@DavidBechtel
Created February 3, 2013 19:04
Show Gist options
  • Save DavidBechtel/4703181 to your computer and use it in GitHub Desktop.
Save DavidBechtel/4703181 to your computer and use it in GitHub Desktop.
FizzBuzz application written in R
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