记录详情

Compile Error

foo.cc: In function 'int main()':
foo.cc:7:9: error: 'cin' was not declared in this scope
    7 |         cin>>a;
      |         ^~~
foo.cc:9:13: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
    9 |         if(b=2)
      |            ~^~
foo.cc:11:9: error: 'cout' was not declared in this scope
   11 |         cout<<"29"<<endl;
      |         ^~~~
foo.cc:11:21: error: 'endl' was not declared in this scope
   11 |         cout<<"29"<<endl;
      |                     ^~~~
foo.cc:13:18: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   13 |         else if(b=2||4||6||9||11)
      |                 ~^~~~~~~~~~~~~~~
foo.cc:15:9: error: 'cout' was not declared in this scope
   15 |         cout<<"30"<<endl;
      |         ^~~~
foo.cc:15:21: error: 'endl' was not declared in this scope
   15 |         cout<<"30"<<endl;
      |                     ^~~~
foo.cc:19:9: error: 'cout' was not declared in this scope
   19 |         cout<<"31"<<endl;
      |         ^~~~
foo.cc:19:21: error: 'endl' was not declared in this scope
   19 |         cout<<"31"<<endl;
      |                     ^~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
A1-3 分支结构练习:月份天数
比赛
2023年新生赛(第一场)
语言
C++
递交时间
2023-08-15 16:58:30
评测时间
2023-08-15 16:58:30
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes