/in/foo.c: In function 'main':
/in/foo.c:6:17: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'int' [-Wformat=]
6 | scanf("%d",n);
| ~^ ~
| | |
| | int
| int *
/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
| ^~~~~~