What output does the following program produce?
long myfunc(int n, int r)
{
if (n >= 0 && r == 0)
return 1;
if (n == 0 && r >0)
return 0;
return myfunc(n - 1, r - 1) + myfunc(n - 1, r);
}
int main()
int num, k;
num = 7; k = 4;
long c = myfunc(num, k);
cout
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here