If the value of x is 5 and y is 2, what will be the return value of the function given below.
fun(x,y)
{
if(x == 0){
return y;
}
else{
return fun(x-1, x+y);
}
}
Answers
Answered by
0
Answer:
- bdjdbkssjsbesbsbdndbdndbbdd
- bbdjdbdidbdbdpabsjskdsjdb
- bjzjdndjdbcjccbxnbfjfjffbf
- bdnddndbdbfjdb.
- bdbdndbdod
- nndndndjdbd
Answered by
5
Answer:17
Explanation: when x=5 and y=2 fun(5,2) goes in and if condition becomes flase goes to else return (4,7)
goes on until x becomes 0 y gets added up 7+4+3+2+1=17
Similar questions
History,
6 months ago
Math,
6 months ago
Social Sciences,
1 year ago
Biology,
1 year ago
Computer Science,
1 year ago
Science,
1 year ago