记录详情

Compile Error

/in/foo.c: In function 'main':
/in/foo.c:13:17: error: expected expression before '}' token
   13 |                 }
      |                 ^
/in/foo.c:14:25: error: 'i' undeclared (first use in this function)
   14 |                    sum+=i;
      |                         ^
/in/foo.c:14:25: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:9:21: warning: variable 'sum' set but not used [-Wunused-but-set-variable]
    9 |                 int sum=1;
      |                     ^~~
/in/foo.c: At top level:
/in/foo.c:20:10: error: expected identifier or '(' before 'if'
   20 |          if(sum==num){
      |          ^~
/in/foo.c:23:7: error: expected identifier or '(' before '}' token
   23 |       }
      |       ^
/in/foo.c:24:7: error: expected identifier or '(' before 'return'
   24 |       return 0;
      |       ^~~~~~
/in/foo.c:25:1: error: expected identifier or '(' before '}' token
   25 | }
      | ^

信息

递交者
类型
自测
语言
C
递交时间
2025-11-15 16:00:47
评测时间
2025-11-15 16:00:47
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes