saving . . . saved fibonacci series correct or not has been deleted. fibonacci series correct or not has been hidden .
fibonacci series correct or not
Title
Question
fibonacci <- function(num1,num2){result <- num1+num2
for(i in 1){result <- c(num1,num2,result,result+i,result+result+i)}
return(result)}

fibonacci(1,1)

Sir I am getting the result 1,1,2,3,5
from the above function
is it correct



R Functions-in-R 11-12 min 10-20 sec 03-07-20, 3:24 p.m. manishakdey@gmail.com

Answers:

Could you please explain the meaning of two arguments (num1 and num2) in your function? 
05-07-20, 12:11 a.m. sudhakarst


Log-in to answer to this question.