foo.cc:18:7: error: expected nested-name-specifier before ‘namesapce’
18 | using namesapce std;
| ^~~~~~~~~
foo.cc: In function ‘int CollatzConjecture(int)’:
foo.cc:27:17: error: ‘i’ was not declared in this scope
27 | int res=i;
| ^
foo.cc: In function ‘int main()’:
foo.cc:33:9: error: ‘cin’ was not declared in this scope; did you mean ‘std::cin’?
33 | cin>>num;
| ^~~
| std::cin
iostream:62:18: note: ‘std::cin’ declared here
foo.cc:35:9: error: ‘cout’ was not declared in this scope; did you mean ‘std::cout’?
35 | cout<<res<<endl;
| ^~~~
| std::cout
iostream:63:18: note: ‘std::cout’ declared here
foo.cc:35:20: error: ‘endl’ was not declared in this scope; did you mean ‘std::endl’?
35 | cout<<res<<endl;
| ^~~~
| std::endl
In file included from iostream:41:
/nix/gcc-13.2.0/include/c++/13.2.0/ostream:735:5: note: ‘std::endl’ declared here
735 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~