记录详情

Compile Error

/in/foo.c: In function 'main':
/in/foo.c:6:10: warning: format '%f' expects argument of type 'float *', but argument 2 has type 'double' [-Wformat=]
  scanf("%f",x);
          ^
/in/foo.c:9:16: warning: comparison of constant '10' with boolean expression is always true [-Wbool-compare]
   }else if(0<=x<10){
                ^
/in/foo.c:9:13: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses]
   }else if(0<=x<10){
            ~^~~
/in/foo.c:10:8: error: invalid operands to binary ^ (have 'float' and 'float')
   y=2*x^2+4*x-5;
     ~~~^~~~~~~~
/in/foo.c:11:17: warning: comparison of constant '25' with boolean expression is always true [-Wbool-compare]
   }else if(10<=x<25){
                 ^
/in/foo.c:11:14: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses]
   }else if(10<=x<25){
            ~~^~~
/in/foo.c:12:13: error: invalid operands to binary ^ (have 'float' and 'int')
   y=(5*x+10)^(1/2);
     ~~~~~~~~^
/in/foo.c:14:6: error: invalid operands to binary ^ (have 'float' and 'int')
   y=x^3;
      ^

信息

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