General FizzBuzz: Difference between revisions
Content added Content deleted
ReeceGoding (talk | contribs) (→{{header|R}}: Shortened code and improved formatting.) |
ReeceGoding (talk | contribs) m (→Names solution) |
||
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) |
||
{ |
{ |