main()
{ int sum(int)
int i
scanf("%d",&磨兄i)
if(i<帆租=0) printf("Input error!")
else printf("sum=%d",sum(i))
}
int sum(int n)
{
if(n==1) return 1 //(1)瞎轿袭
else return n+sum(n-1)//(2)
}
int average(int score[],int n){
int sum=0
if(n==0) return 0
else return average(score,n-1)+score[n-1]
}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)