Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:7:18: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
    7 |         for(a<=60&&b>=60||b<=60&&a>=60)
      |             ~~~~~^~~~~~~
/in/foo.cc:7:39: error: expected ';' before ')' token
    7 |         for(a<=60&&b>=60||b<=60&&a>=60)
      |                                       ^
      |                                       ;
/in/foo.cc:7:25: warning: statement has no effect [-Wunused-value]
    7 |         for(a<=60&&b>=60||b<=60&&a>=60)
      |             ~~~~~~~~~~~~^~~~~~~~~~~~~~
/in/foo.cc:9:9: error: expected primary-expression before 'else'
    9 |         else
      |         ^~~~
/in/foo.cc:8:19: error: expected ';' before 'else'
    8 |         cout<<"1";
      |                   ^
      |                   ;
    9 |         else
      |         ~~~~       
/in/foo.cc:9:9: error: expected primary-expression before 'else'
    9 |         else
      |         ^~~~
/in/foo.cc:8:19: error: expected ')' before 'else'
    8 |         cout<<"1";
      |                   ^
      |                   )
    9 |         else
      |         ~~~~       
/in/foo.cc:7:12: note: to match this '('
    7 |         for(a<=60&&b>=60||b<=60&&a>=60)
      |            ^
/in/foo.cc:9:9: error: expected primary-expression before 'else'
    9 |         else
      |         ^~~~

信息

递交者
类型
递交
题目
P1714 有一门课不及格的学生
语言
C++
递交时间
2025-11-29 16:58:08
评测时间
2025-11-29 16:58:08
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes