+ 1
Can anyone explain this code
8 ответов
+ 5
It's recursive function
+ 4
Your Function give me answer 72 when i am passing value 5 to the function
+ 4
~ swim ~ Mohammed Qadir khan thanks you both I traced it on paper it's clear now thanks for the help
+ 2
Ok
+ 2
I think they
Add and Multiply with previous to give you total value
+ 2
72
+ 1
Mohammed Qadir khan yeah
~ swim ~ Can you help me to explain this code
int fun(int n){
int x = 1,k;
if(n==1){
return x;
}
for(k = 1;k<n;k++){
x = x + fun(k)*fun(n-k);
}
return x;
}
+ 1
~ swim ~ what will be the output if we take 5 as input