int sum(int n)/*递归函数*/
{if(n==1) return 1;
else return n+sum(n-1);
}
void main()
{printf("sum=%d\n", sum(10));}