General FizzBuzz: Difference between revisions

Content added Content deleted
(→‎{{header|R}}: Shortened code and improved formatting.)
Line 2,885: Line 2,885:
<lang r>namedGenFizzBuzz <- function(n, namedNums)
<lang r>namedGenFizzBuzz <- function(n, namedNums)
{
{
factors<-sort(namedNums)#Required by the task: We must go from least factor to greatest.
factors <- sort(namedNums)#Required by the task: We must go from least factor to greatest.
for(i in 1:n)
for(i in 1:n)
{
{