利用递归返回数组中的最大值

int theMax(int a[],int n)

{

int t;

if(n>1)

{

t=f(a,n-1);

return t>a[n-1]?t:a[n-1];

}

else

return a[0];

}

猜你喜欢

转载自blog.csdn.net/u011370813/article/details/79587491