foo.c:2:6: warning: return type of 'main' is not 'int' [-Wmain]
2 | void main()
| ^~~~
foo.c: In function 'main':
foo.c:4:5: error: expected ',' or ';' before 'scanf'
4 | scanf("%d",&n);
| ^~~~~
foo.c:5:5: error: 'while\U0000ff08n\U0000ff09' undeclared (first use in this function)
5 | while(n)
| ^~~~~~~~~~
foo.c:5:5: note: each undeclared identifier is reported only once for each function it appears in
foo.c:5:15: error: expected ';' before '{' token
5 | while(n)
| ^
| ;
6 | { sum+=(n%10)*p;
| ~
foo.c:3:17: warning: unused variable 'p' [-Wunused-variable]
3 | { int n,sum=0,p=1
| ^
foo.c:3:11: warning: unused variable 'sum' [-Wunused-variable]
3 | { int n,sum=0,p=1
| ^~~
foo.c:3:9: warning: unused variable 'n' [-Wunused-variable]
3 | { int n,sum=0,p=1
| ^
[Hydro](https://hydro.ac)提供评测服务