Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:8:10: warning: comparison of constant '18' with boolean expression is always true [-Wbool-compare]
   if(0<=i<=18)
      ~~~~^~~~
/in/foo.cc:8:7: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses]
   if(0<=i<=18)
      ~^~~
/in/foo.cc:9:8: warning: statement has no effect [-Wunused-value]
    sum1+1;
    ~~~~^~
/in/foo.cc:10:14: warning: comparison of constant '35' with boolean expression is always true [-Wbool-compare]
      if(19<=n<=35)
         ~~~~~^~~~
/in/foo.cc:10:11: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses]
      if(19<=n<=35)
         ~~^~~
/in/foo.cc:11:11: warning: statement has no effect [-Wunused-value]
       sum2+1;
       ~~~~^~
/in/foo.cc:12:13: error: 'i' was not declared in this scope
      if(36<=i<=60)
             ^
/in/foo.cc:13:11: warning: statement has no effect [-Wunused-value]
       sum3+1;
       ~~~~^~
/in/foo.cc:14:9: error: 'i' was not declared in this scope
      if(i>=61)
         ^
/in/foo.cc:15:11: warning: statement has no effect [-Wunused-value]
       sum4+1; 
       ~~~~^~

信息

递交者
类型
递交
题目
P1107 1.6.5年龄与疾病
比赛
2025.1.1初级班结业测试
语言
C++
递交时间
2025-01-01 08:56:15
评测时间
2025-01-01 08:56:15
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes