Compile Error

foo.cc: In function 'int main()':
foo.cc:11:21: warning: comparison of constant '10' with boolean expression is always true [-Wbool-compare]
   11 |         else if(1<=x<10)
      |                 ~~~~^~~
foo.cc:11:18: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses]
   11 |         else if(1<=x<10)
      |                 ~^~~
foo.cc:15:22: warning: comparison of constant '15' with boolean expression is always true [-Wbool-compare]
   15 |         else if(10<=x<15)
      |                 ~~~~~^~~
foo.cc:15:19: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses]
   15 |         else if(10<=x<15)
      |                 ~~^~~
foo.cc:19:22: warning: comparison of constant '30' with boolean expression is always true [-Wbool-compare]
   19 |         else if(15<=x<30)
      |                 ~~~~~^~~
foo.cc:19:19: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses]
   19 |         else if(15<=x<30)
      |                 ~~^~~
foo.cc:23:20: error: expected ';' before '{' token
   23 |         else(x>=30)
      |                    ^
      |                    ;
   24 |         {
      |         ~           
foo.cc:23:15: warning: statement has no effect [-Wunused-value]
   23 |         else(x>=30)
      |             ~~^~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1021 分段函数
语言
C++
递交时间
2023-12-01 07:17:36
评测时间
2023-12-01 07:17:36
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes