记录详情

Compile Error

/in/foo.c:2:2: error: invalid preprocessing directive #unclude
 #unclude <math.h>
  ^~~~~~~
/in/foo.c: In function 'main':
/in/foo.c:11:3: error: expected ';' before 'printf'
   printf("%.3f",y);
   ^~~~~~
/in/foo.c:12:2: error: expected '}' before 'else'
  else if(x>=0 AND x<10)
  ^~~~
/in/foo.c:12:15: error: expected ')' before 'AND'
  else if(x>=0 AND x<10)
               ^~~
/in/foo.c:14:3: error: expected ';' before 'printf'
   printf("%.3f",y);
   ^~~~~~
/in/foo.c:15:16: error: expected ')' before 'AND'
  else if(x>=10 AND x<25)
                ^~~
/in/foo.c:16:5: warning: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]
   y=sqrt(5*x+10)
     ^~~~
/in/foo.c:16:5: warning: incompatible implicit declaration of built-in function 'sqrt'
/in/foo.c:16:5: note: include '<math.h>' or provide a declaration of 'sqrt'
/in/foo.c:17:3: error: expected ';' before 'printf'
   printf("%.3f",y);
   ^~~~~~
/in/foo.c:20:3: error: expected ';' before 'printf'
   printf("%.3f",y);
   ^~~~~~
/in/foo.c:6:14: warning: variable 'y' set but not used [-Wunused-but-set-variable]
     double x,y;
              ^
/in/foo.c: At top level:
/in/foo.c:22:2: error: expected identifier or '(' before 'return'
  return 0;
  ^~~~~~
/in/foo.c:23:1: error: expected identifier or '(' before '}' token
 }
 ^

信息

递交者
类型
自测
语言
C
递交时间
2024-10-29 16:53:29
评测时间
2024-10-29 16:53:29
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes