Compile Error
foo.cc: In function ‘bool leap(int)’:
foo.cc:6:18: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
6 | if(y%4==0&&y%100!=0||y%400==0) return true;
| ~~~~~~^~~~~~~~~~
foo.cc: In function ‘int monthday(int, int)’:
foo.cc:14:14: error: ‘day’ was not declared in this scope
14 | else day=31;
| ^~~
foo.cc: In function ‘int main()’:
foo.cc:37:35: error: expected ‘;’ before ‘m’
37 | day-=monthday(y,m)
| ^
| ;
38 | m++;
| ~
信息
- 递交者
- 类型
- 递交
- 题目
- P2691 一万天以后的日期(函数)
- 语言
- C++
- 递交时间
- 2025-07-20 09:03:22
- 评测时间
- 2025-07-20 09:03:22
- 评测机
- 分数
- 0
- 总耗时
- 0ms
- 峰值内存
- 0 Bytes