C语言实现如下:
#include
void main()
{
int n,i=1;
long s=0;
printf("please input the n you want!:");
scanf("%d",%n);
for(;i