int sum(int a[],int n)
注意
n是数组下标
return n==0?a[n]:sum(a,n-1)+a[n]
还是数组的元素个数
return n==1?a[n-1]:sum(a,n-1)+a[n-1];