foo.cc: In function ‘int main()’:
foo.cc:6:5: error: ‘cin’ was not declared in this scope
6 | cin >> n;
| ^~~
foo.cc:1:1: note: ‘std::cin’ is defined in header ‘<iostream>’; this is probably fixable by adding ‘#include <iostream>’
+++ |+#include <iostream>
1 | using namespace std;
foo.cc:15:9: error: ‘cout’ was not declared in this scope
15 | cout << i + 1 ;
| ^~~~
foo.cc:15:9: note: ‘std::cout’ is defined in header ‘<iostream>’; this is probably fixable by adding ‘#include <iostream>’
foo.cc:50:5: error: ‘cout’ was not declared in this scope
50 | cout << total_num << "/" << total_den << endl;
| ^~~~
foo.cc:50:5: note: ‘std::cout’ is defined in header ‘<iostream>’; this is probably fixable by adding ‘#include <iostream>’
foo.cc:50:46: error: ‘endl’ was not declared in this scope
50 | cout << total_num << "/" << total_den << endl;
| ^~~~
foo.cc:1:1: note: ‘std::endl’ is defined in header ‘<ostream>’; this is probably fixable by adding ‘#include <ostream>’
+++ |+#include <ostream>
1 | using namespace std;