记录详情

Compile Error

foo.cc: In function ‘int main()’:
foo.cc:3:17: error: ‘cin’ was not declared in this scope
    3 |         int y,m;cin>>y>>m;
      |                 ^~~
foo.cc:1:1: note: ‘std::cin’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
  +++ |+#include <iostream>
    1 | using namespace std;
foo.cc:8:30: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
    8 |         if(y%400==0 || y%4==0&&y%100!=0)
      |                        ~~~~~~^~~~~~~~~~
foo.cc:11:9: error: ‘cout’ was not declared in this scope
   11 |         cout<<d;
      |         ^~~~
foo.cc:11:9: note: ‘std::cout’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
正在同步测试数据,请稍后

信息

递交者
类型
递交
题目
P1006 A1-3 分支结构练习:月份天数
语言
C++
递交时间
2024-03-29 12:28:35
评测时间
2024-03-29 12:28:35
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes