记录详情

Compile Error

foo.cc: In function 'int main()':
foo.cc:6:9: error: 'cin' was not declared in this scope
    6 |         cin>>year>>month;
      |         ^~~
foo.cc:8:12: error: '\U0000ff08year' was not declared in this scope; did you mean 'year'?
    8 |         if((year %4==0 && year %100 !=0) || (year % 400==0))
      |            ^~~~~~
      |            year
foo.cc:8:37: error: expected ')' before '\U0000ff01'
    8 |         if((year %4==0 && year %100 !=0) || (year % 400==0))
      |           ~                         ^~~
      |                                     )
foo.cc:8:64: error: expected primary-expression before ')' token
    8 |         if((year %4==0 && year %100 !=0) || (year % 400==0))
      |                                                                ^
foo.cc:17:25: error: 'cout' was not declared in this scope
   17 |                         cout<<"29";
      |                         ^~~~
foo.cc:21:25: error: 'cout' was not declared in this scope
   21 |                         cout<<"28";
      |                         ^~~~
foo.cc:24:13: error: expected '(' before '\U0000ff08month'
   24 |     else if (month==1|| month==3||month==5||month==7||month==8||month==10||month==12)
      |             ^~~~~~~
      |             (
foo.cc:28:5: error: 'else' without a previous 'if'
   28 |     else
      |     ^~~~
foo.cc:30:14: error: 'cout' was not declared in this scope
   30 |              cout<<"30";
      |              ^~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
自测
题目
A1-3 分支结构练习:月份天数
语言
C++
递交时间
2023-08-15 15:21:49
评测时间
2023-08-15 15:21:49
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes