/in/foo.c: In function 'main':
/in/foo.c:10:16: error: 'i' undeclared (first use in this function)
10 | fact *=i;
| ^
/in/foo.c:10:16: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c: At top level:
/in/foo.c:13:8: error: expected declaration specifiers or '...' before string constant
13 | printf("%d\n",sum);
| ^~~~~~
/in/foo.c:13:15: error: unknown type name 'sum'
13 | printf("%d\n",sum);
| ^~~
/in/foo.c:14:1: error: expected identifier or '(' before 'return'
14 | return 0
| ^~~~~~