Problem 3nplus1
User minmin19
Submission Time 2024-07-11 22:58:28
Score 0
Max Time N/A
Max Memory N/A

Compile Error

3nplus1.cpp:11:15: error: missing terminating " character
11 | cout << n << "n\";
| ^~~~~
3nplus1.cpp: In function ‘int main()’:
3nplus1.cpp:7:5: error: expected ‘(’ before ‘n’
7 | if n ==1;
| ^
| (
3nplus1.cpp:12:3: error: expected primary-expression before ‘if’
12 | if (n%=0);
| ^~
3nplus1.cpp:14:8: error: expected ‘;’ before ‘}’ token
14 | n=n/2
| ^
| ;
15 | }
| ~
3nplus1.cpp:16:2: error: ‘else’ without a previous ‘if’
16 | else;
| ^~~~
3nplus1.cpp:18:12: error: expected ‘;’ before ‘}’ token
18 | n=3*n + 1
| ^
| ;
19 | }
| ~