注意:此页面搜索的是所有试题
下面的函数sum(int n)完成计算1~n的累加和。
    sum(int n)
{ if(n<=0)
printf("data error\n");
if(n==1) ① ;
else ② ;
}

参考答案