foo.cc: In function 'int main()':
foo.cc:21:2: error: 'cin' was not declared in this scope
21 | cin>>a;
| ^~~
foo.cc:4:1: note: 'std::cin' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
3 | #include <ctime>
+++ |+#include <iostream>
4 | using namespace std;
foo.cc:30:8: error: 'cout' was not declared in this scope
30 | cout<<x<<endl;
| ^~~~
foo.cc:30:8: note: 'std::cout' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
foo.cc:30:17: error: 'endl' was not declared in this scope
30 | cout<<x<<endl;
| ^~~~
foo.cc:4:1: note: 'std::endl' is defined in header '<ostream>'; did you forget to '#include <ostream>'?
3 | #include <ctime>
+++ |+#include <ostream>
4 | using namespace std;
foo.cc:33:8: error: 'cout' was not declared in this scope
33 | cout<<x<<" ";
| ^~~~
foo.cc:33:8: note: 'std::cout' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
[Hydro](https://hydro.ac)提供评测服务