int a=3,b=4
int (a equals 1)
return b+6
else if (a equal 1)
return b
else
return fun (a-1,a+b+5)+fun+(a-1,a+b)
end if
end if
Answers
Answered by
1
Answer:
include <iostream>
using namespace std;
int fun(int a, int b)
{
if (b == 0)
return 0;
if (b % 2 == 0)
return fun(a + a, b/2);
return fun(a + a, b/2) + a;
}
int main()
{
cout << fun(4, 3) ;
return 0;
}
Step-by-step explanation:
May it help please mark me as brainliest
Similar questions