Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:12:11: error: lvalue required as left operand of assignment
    if(y-1=11) t+=30;
           ^~
/in/foo.cc:13:11: error: lvalue required as left operand of assignment
    if(y-1=10) t+=31;
           ^~
/in/foo.cc:14:11: error: lvalue required as left operand of assignment
    if(y-1=9) t+=30;
           ^
/in/foo.cc:15:11: error: lvalue required as left operand of assignment
    if(y-1=8) t+=31;
           ^
/in/foo.cc:16:11: error: lvalue required as left operand of assignment
    if(y-1=7) t+=31;
           ^
/in/foo.cc:17:11: error: lvalue required as left operand of assignment
    if(y-1=6) t+=30;
           ^
/in/foo.cc:18:11: error: lvalue required as left operand of assignment
    if(y-1=5) t+=31;
           ^
/in/foo.cc:19:11: error: lvalue required as left operand of assignment
    if(y-1=4) t+=30;
           ^
/in/foo.cc:20:11: error: lvalue required as left operand of assignment
    if(y-1=3) t+=31;
           ^
/in/foo.cc:21:11: error: lvalue required as left operand of assignment
    if(y-1=2) t+=28;
           ^
/in/foo.cc:22:11: error: lvalue required as left operand of assignment
    if(y-1=1) t+=31;
           ^
/in/foo.cc:23:11: error: lvalue required as left operand of assignment
    if(y-1=0) 
           ^
/in/foo.cc:24:3: error: expected primary-expression before '}' token
   }
   ^

信息

递交者
类型
递交
题目
P1029 A1-4 循环结构练习:今年过去了多少天
语言
C++
递交时间
2022-01-10 09:17:59
评测时间
2022-01-10 09:17:59
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes