记录详情

Compile Error

/in/foo.c: In function 'main':
/in/foo.c:12:19: error: invalid suffix ")" on integer constant
   12 |         if (delta>0)
      |                   ^~~
/in/foo.c:12:22: error: expected ')' before 'double'
   12 |         if (delta>0)
      |            ~         ^
      |                      )
   13 |             double x1 = (-b + sqrt(delta)) / (2 * a);
      |             ~~~~~~    
/in/foo.c:17:9: error: expected expression before '}' token
   17 |         } else if (delta==0) {
      |         ^
/in/foo.c:17:11: error: 'else' without a previous 'if'
   17 |         } else if (delta==0) {
      |           ^~~~
/in/foo.c:20:16: error: '\U0000ff5b' undeclared (first use in this function)
   20 |         } else {
      |                ^~
/in/foo.c:20:16: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:20:18: error: expected ';' before 'double'
   20 |         } else {
      |                  ^
      |                  ;
   21 |             double real = -b / (2 * a);
      |             ~~~~~~
/in/foo.c:23:38: error: 'real' undeclared (first use in this function)
   23 |             printf("%.2lf+%.2lfi\n", real, imag);
      |                                      ^~~~
/in/foo.c: At top level:
/in/foo.c:26:5: error: expected identifier or '(' before '}' token
   26 |     }
      |     ^
/in/foo.c:27:5: error: expected identifier or '(' before 'return'
   27 |     return 0;
      |     ^~~~~~
/in/foo.c:28:1: error: expected identifier or '(' before '}' token
   28 | }
      | ^

信息

递交者
类型
自测
语言
C
递交时间
2025-12-24 11:31:58
评测时间
2025-12-24 11:31:58
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes