foo.cc: In function ‘int main()’:
foo.cc:6:34: warning: format ‘%d’ expects a matching ‘int’ argument [-Wformat=]
6 | printf("输入年份,月份:%d");
| ~^
| |
| int
foo.cc:9:10: warning: statement has no effect [-Wunused-value]
9 | b<=12;
| ~^~~~
foo.cc:10:53: error: lvalue required as left operand of assignment
10 | if (b=1 || b=3 || b=5 || b=7 || b=8 || b=10 || b=12)
| ~~~^~~~
foo.cc:11:26: warning: format ‘%d’ expects a matching ‘int’ argument [-Wformat=]
11 | printf("31天%d\n");
| ~^
| |
| int
foo.cc:13:21: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
13 | if(b=2 && a%4==0 && a%100!=0 && a%400==0)
| ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foo.cc:14:38: warning: format ‘%d’ expects a matching ‘int’ argument [-Wformat=]
14 | printf("29天%d\n");
| ~^
| |
| int
foo.cc:16:38: warning: format ‘%d’ expects a matching ‘int’ argument [-Wformat=]
16 | printf("28天%d\n");
| ~^
| |
| int
foo.cc:18:31: warning: format ‘%d’ expects a matching ‘int’ argument [-Wformat=]
18 | printf("30天%d\n");
| ~^
| |
| int
foo.cc:5:13: warning: unused variable ‘c’ [-Wunused-variable]
5 | int a,b,c;
| ^