一道C语言的编程题目,求高手帮忙
RefertofunctiononebelowwhenansweringQuestions1intone(intm,intn){intans;if(m<10)if(n<1...
Refer to function one below when answering Questions 1
int
one(int m, int n)
{
int ans;
if (m < 10)
if (n < 10)
ans = m + n;
else
ans = one(m, n - 2) + n;
else
ans = one(m - 1, n) + m;
return (ans);
}
1.What is the value of one(11, 11)?
a. 18
b. 29
c. 39
d. 50
e. none of the above
我扣扣 二四七七六二五七,加我帮忙解释下~~3Q
因为某种原因不能打数字^o^ 展开
int
one(int m, int n)
{
int ans;
if (m < 10)
if (n < 10)
ans = m + n;
else
ans = one(m, n - 2) + n;
else
ans = one(m - 1, n) + m;
return (ans);
}
1.What is the value of one(11, 11)?
a. 18
b. 29
c. 39
d. 50
e. none of the above
我扣扣 二四七七六二五七,加我帮忙解释下~~3Q
因为某种原因不能打数字^o^ 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询