下面的函数sum(int n)完成计算1~n的累加和。
    sum(int n)
{ if(n<=0)
printf("data error\n");
if(n==1) ① ;
else ② ;
}
出自:安阳师范学院-计算机基础与程序设计