记录详情

Compile Error

/in/foo.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include <stdio.h>
      |         ^
/in/foo.c: In function 'main':
/in/foo.c:9:5: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    9 |     scanf("%f,%f,%f", &a, &b, &c);
      |     ^~~~~
/in/foo.c:3:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
    2 | #include <math.h>
  +++ |+#include <stdio.h>
    3 | 
/in/foo.c:9:5: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    9 |     scanf("%f,%f,%f", &a, &b, &c);
      |     ^~~~~
/in/foo.c:9:5: note: include '<stdio.h>' or provide a declaration of 'scanf'
/in/foo.c:15:9: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   15 |         printf("%.2f\n", x1);
      |         ^~~~~~
/in/foo.c:15:9: note: include '<stdio.h>' or provide a declaration of 'printf'
/in/foo.c:15:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
/in/foo.c:15:9: note: include '<stdio.h>' or provide a declaration of 'printf'
/in/foo.c:25:13: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   25 |             printf("%.2f\n", x1);
      |             ^~~~~~
/in/foo.c:25:13: note: include '<stdio.h>' or provide a declaration of 'printf'
/in/foo.c:31:13: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   31 |             printf("%.2f\n", x1);
      |             ^~~~~~
/in/foo.c:31:13: note: include '<stdio.h>' or provide a declaration of 'printf'
/in/foo.c:35:13: error: 'real_part' undeclared (first use in this function)
   35 |             real_part = -b / (2 * a);
      |             ^~~~~~~~~
/in/foo.c:35:13: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:34:9: warning: this 'else' clause does not guard... [-Wmisleading-indentation]
   34 |         else
      |         ^~~~
/in/foo.c:36:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'else'
   36 |             imag_part = sqrt(-delta) / (2 * a);
      |             ^~~~~~~~~
/in/foo.c:36:13: error: 'imag_part' undeclared (first use in this function)
/in/foo.c:37:13: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   37 |             printf("%.2f + %.2fi\n", real_part, imag_part);
      |             ^~~~~~
/in/foo.c:37:13: note: include '<stdio.h>' or provide a declaration of 'printf'
/in/foo.c: At top level:
/in/foo.c:42:5: error: expected identifier or '(' before 'return'
   42 |     return 0;
      |     ^~~~~~
/in/foo.c:43:1: error: expected identifier or '(' before '}' token
   43 | }
      | ^

信息

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