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

Compile Error

3nplus1.cpp: In function ‘int main()’:
3nplus1.cpp:8:2: error: ‘list’ was not declared in this scope
8 | list<int> myList;
| ^~~~
3nplus1.cpp:2:1: note: ‘std::list’ is defined in header ‘<list>’; did you forget to ‘#include <list>’?
1 | #include <iostream>
+++ |+#include <list>
2 | using namespace std;
3nplus1.cpp:8:7: error: expected primary-expression before ‘int’
8 | list<int> myList;
| ^~~
3nplus1.cpp:12:11: error: expected ‘;’ before ‘}’ token
12 | n = n/2
| ^
| ;
13 | }
| ~
3nplus1.cpp:15:8: error: unable to find numeric literal operator ‘operator""n’
15 | n = 3n + 1
| ^~
3nplus1.cpp:17:3: error: ‘myList’ was not declared in this scope
17 | myList.push_back(n);
| ^~~~~~
3nplus1.cpp:19:10: error: ‘myList’ was not declared in this scope
19 | co