Problem 3nplus1
User innerspace777
Submission Time 2024-05-10 19:28:31
Score 0
Max Time N/A
Max Memory N/A

Compile Error

3nplus1.cpp: In function ‘int main()’:
3nplus1.cpp:7:8: error: ‘x’ was not declared in this scope
7 | if ((x % 2) == 1) {
| ^
3nplus1.cpp:8:15: error: expected ‘;’ before ‘}’ token
8 | n = 3*n + 1
| ^
| ;
9 | } else {
| ~
3nplus1.cpp:10:11: error: expected ‘;’ before ‘}’ token
10 | n = n/2
| ^
| ;
11 | }
| ~
3nplus1.cpp:12:16: error: ‘x’ was not declared in this scope
12 | std::cout << x << " "
| ^