/in/foo.cc: In function 'int main()':
/in/foo.cc:5:11: error: 'time' was not declared in this scope
5 | srand(time(0));
| ^~~~
/in/foo.cc:1:1: note: 'time' is defined in header '<ctime>'; did you forget to '#include <ctime>'?
+++ |+#include <ctime>
1 | using namespace std;
/in/foo.cc:5:5: error: 'srand' was not declared in this scope
5 | srand(time(0));
| ^~~~~
/in/foo.cc:8:22: error: 'rand' was not declared in this scope
8 | int random_num = rand();
| ^~~~
/in/foo.cc:19:9: error: 'cout' was not declared in this scope
19 | cout<<ans<<endl;
| ^~~~
/in/foo.cc:1:1: note: 'std::cout' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
+++ |+#include <iostream>
1 | using namespace std;
/in/foo.cc:19:15: error: 'ans' was not declared in this scope
19 | cout<<ans<<endl;
| ^~~
/in/foo.cc:19:20: error: 'endl' was not declared in this scope
19 | cout<<ans<<endl;
| ^~~~
/in/foo.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; did you forget to '#include <ostream>'?
+++ |+#include <ostream>
1 | using namespace std;
/in/foo.cc:8:9: warning: unused variable 'random_num' [-Wunused-variable]
8 | int random_num = rand();
| ^~~~~~~~~~