主函数这样
int main(){
int sum = 0;
int i;
int n;
printf("Please input a number:");
scanf("%d", &n);
for (i = 1;i