记录详情

Compile Error

/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
      | ^~~~~~

信息

递交者
类型
自测
语言
C
递交时间
2025-11-20 14:39:19
评测时间
2025-11-20 14:39:19
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes