4th Nov 2019, 7:00 PM
Preity
Preity - avatar
8 ответов
+ 5
It's recursive function
4th Nov 2019, 7:19 PM
Mohammed Qadir Khan
Mohammed Qadir Khan - avatar
+ 4
Your Function give me answer 72 when i am passing value 5 to the function
4th Nov 2019, 7:34 PM
Mohammed Qadir Khan
Mohammed Qadir Khan - avatar
+ 4
~ swim ~ Mohammed Qadir khan thanks you both I traced it on paper it's clear now thanks for the help
4th Nov 2019, 7:56 PM
Preity
Preity - avatar
+ 2
Ok
4th Nov 2019, 7:21 PM
Mohammed Qadir Khan
Mohammed Qadir Khan - avatar
+ 2
I think they Add and Multiply with previous to give you total value
4th Nov 2019, 7:35 PM
Mohammed Qadir Khan
Mohammed Qadir Khan - avatar
+ 2
72
4th Nov 2019, 7:51 PM
Mohammed Qadir Khan
Mohammed Qadir Khan - avatar
+ 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; }
4th Nov 2019, 7:21 PM
Preity
Preity - avatar
+ 1
~ swim ~ what will be the output if we take 5 as input
4th Nov 2019, 7:50 PM
Preity
Preity - avatar