记录详情

Compile Error

/in/foo.c: In function 'main':
/in/foo.c:8:2: error: 'else' without a previous 'if'
  else
  ^~~~
/in/foo.c:12:2: error: 'else' without a previous 'if'
  else
  ^~~~
/in/foo.c:14:6: warning: implicit declaration of function 'pow' [-Wimplicit-function-declaration]
    y=pow(5*x+10),0.5);
      ^~~
/in/foo.c:14:6: warning: incompatible implicit declaration of built-in function 'pow'
/in/foo.c:14:6: note: include '<math.h>' or provide a declaration of 'pow'
/in/foo.c:14:6: error: too few arguments to function 'pow'
/in/foo.c:14:17: warning: left-hand operand of comma expression has no effect [-Wunused-value]
    y=pow(5*x+10),0.5);
                 ^
/in/foo.c:14:17: warning: statement with no effect [-Wunused-value]
/in/foo.c:14:21: error: expected ';' before ')' token
    y=pow(5*x+10),0.5);
                     ^
/in/foo.c:13:3: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   if(10<=x&&25>x)
   ^~
/in/foo.c:14:21: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
    y=pow(5*x+10),0.5);
                     ^
/in/foo.c:14:21: error: expected statement before ')' token
/in/foo.c:16:2: error: 'else' without a previous 'if'
  else
  ^~~~
/in/foo.c:18:3: error: expected ';' before 'printf'
   printf("%.3f",y);
   ^~~~~~

信息

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