foo.c: In function 'main':
foo.c:4:12: error: stray '\357' in program
int n,i,sum=0;
^
foo.c:4:13: error: stray '\274' in program
int n,i,sum=0;
^
foo.c:4:14: error: stray '\214' in program
int n,i,sum=0;
^
foo.c:4:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'sum'
int n,i,sum=0;
^~~
foo.c:8:9: error: 'i' undeclared (first use in this function)
for(i = 2; i <= n; i++)
^
foo.c:8:9: note: each undeclared identifier is reported only once for each function it appears in
foo.c:17:9: error: 'sum' undeclared (first use in this function)
sum+=i
^~~
foo.c:18:2: error: expected ';' before 'printf'
printf("\n",sum);
^~~~~~
foo.c:18:13: error: stray '\357' in program
printf("\n",sum);
^
foo.c:18:14: error: stray '\274' in program
printf("\n",sum);
^
foo.c:18:15: error: stray '\214' in program
printf("\n",sum);
^
foo.c:6:5: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&n);
^~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务