Created
June 27, 2017 11:39
-
-
Save MikeMKH/fc21cf4d2771f8dc8366d95ab9f6c82a to your computer and use it in GitHub Desktop.
FizzBuzz kata in R
This file contains hidden or 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
fizzy <- seq(0, 100, 3) | |
buzzy <- seq(0, 100, 5) | |
fizzbuzzy <- fizzy[fizzy %in% buzzy] | |
fizzbuzz <- 0:100 | |
fizzbuzz[fizzbuzz %in% fizzbuzzy] <- "FizzBuzz" | |
fizzbuzz[fizzbuzz %in% fizzy] <- "Fizz" | |
fizzbuzz[fizzbuzz %in% buzzy] <- "Buzz" | |
fizzbuzz |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment