Compile Error

foo.cc: In function ‘int main()’:
foo.cc:13:38: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
   13 |                 if(y%400==0 || y%4==0&&y%100!=0)
      |                                ~~~~~~^~~~~~~~~~
foo.cc:24:38: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
   24 |                 if(y%400==0 || y%4==0&&y%100!=0)
      |                                ~~~~~~^~~~~~~~~~
foo.cc:35:38: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
   35 |                 if(y%400==0 || y%4==0&&y%100!=0)
      |                                ~~~~~~^~~~~~~~~~
foo.cc:45:34: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
   45 |             if(y%400==0 || y%4==0&&y%100!=0)
      |                            ~~~~~~^~~~~~~~~~
foo.cc:56:34: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
   56 |             if(y%400==0 || y%4==0&&y%100!=0)
      |                            ~~~~~~^~~~~~~~~~
foo.cc:67:34: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
   67 |             if(y%400==0 || y%4==0&&y%100!=0)
      |                            ~~~~~~^~~~~~~~~~
foo.cc:78:34: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
   78 |             if(y%400==0 || y%4==0&&y%100!=0)
      |                            ~~~~~~^~~~~~~~~~
foo.cc:89:34: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
   89 |             if(y%400==0 || y%4==0&&y%100!=0)
      |                            ~~~~~~^~~~~~~~~~
foo.cc:100:34: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
  100 |             if(y%400==0 || y%4==0&&y%100!=0)
      |                            ~~~~~~^~~~~~~~~~
foo.cc:111:34: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
  111 |             if(y%400==0 || y%4==0&&y%100!=0)
      |                            ~~~~~~^~~~~~~~~~
foo.cc:122:34: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
  122 |             if(y%400==0 || y%4==0&&y%100!=0)
      |                            ~~~~~~^~~~~~~~~~
foo.cc:133:4: error: expected ‘}’ at end of input
  133 |   }
      |    ^
foo.cc:4:3: note: to match this ‘{’
    4 |   {
      |   ^

信息

递交者
类型
递交
题目
P1030 A1-4 分支结构练习:今年过去了多少天
语言
C++
递交时间
2025-04-09 18:55:43
评测时间
2025-04-09 18:55:43
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes