Problem 3nplus1
User TheAccomplice
Submission Time 2024-04-06 22:59:42
Score 0
Max Time N/A
Max Memory N/A

Compile Error

3nplus1.cpp: In function ‘int main()’:
3nplus1.cpp:13:11: error: expected ‘;’ before ‘}’ token
13 | n = n/2
| ^
| ;
14 | }
| ~
3nplus1.cpp:16:8: error: unable to find numeric literal operator ‘operator""n’
16 | n = 3n + 1
| ^~
3nplus1.cpp:20:7: error: no match for ‘operator<<’ (operand types are ‘std::ostream’ {aka ‘std::basic_ostream<char>’} and ‘std::__cxx11::list<int>’)
20 | cout << myList;
| ~~~~ ^~ ~~~~~~
| | |
| | std::__cxx11::list<int>
| std::ostream {aka std::basic_ostream<char>}
In file included from /usr/include/c++/9/iostream:39,
from 3nplus1.cpp:1:
/usr/include/c++/9/ostream:108:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _T