A Collection of Code Snippets in as Many Programming Languages as Possible
This project is maintained by TheRenegadeCoder
Welcome to the Fizz Buzz in R page! Here, you'll find the source code for this program as well as a description of how the program works.
fizz_buzz <- function(){
for (x in 1:100){
out<-''
mod3<- x%%3==0
mod5 <- x%%5==0
if (!mod3 && !mod5){
out=x
}
if (mod3){
out='Fizz'
}
if (mod5){
out=paste0(out,'Buzz')
}
cat(out, "\n")
}
}
fizz_buzz()
Fizz Buzz in R was written by:
If you see anything you'd like to change or update, please consider contributing.
Note: The solution shown above is the current solution in the Sample Programs repository as of Oct 18 2020 17:59:43. The solution was first committed on Oct 24 2019 16:13:46. As a result, documentation below may be outdated.
No 'How to Implement the Solution' section available. Please consider contributing.
No 'How to Run the Solution' section available. Please consider contributing.