/in/foo.c: In function 'main':
/in/foo.c:3:1: error: parameter 'x' is initialized
int n,x=1,sum=0
^~~
/in/foo.c:3:1: error: parameter 'sum' is initialized
/in/foo.c:4:2: error: expected ',' or ';' before 'scanf'
scanf("%d"&n);
^~~~~
/in/foo.c:5:2: error: expected declaration specifiers before 'for'
for(int i =1;i<=n;i++){
^~~
/in/foo.c:5:15: error: expected declaration specifiers before 'i'
for(int i =1;i<=n;i++){
^
/in/foo.c:5:20: error: expected declaration specifiers before 'i'
for(int i =1;i<=n;i++){
^
/in/foo.c:9:1: error: expected declaration specifiers before 'print'
print("%d",sum);
^~~~~
/in/foo.c:10:1: error: expected declaration specifiers before '}' token
}
^
/in/foo.c:3:11: error: declaration for parameter 'sum' but no such parameter
int n,x=1,sum=0
^~~
/in/foo.c:3:7: error: declaration for parameter 'x' but no such parameter
int n,x=1,sum=0
^
/in/foo.c:3:5: error: declaration for parameter 'n' but no such parameter
int n,x=1,sum=0
^
/in/foo.c:10:1: error: expected '{' at end of input
}
^