Problem 3nplus1
User Red123
Submission Time 2025-03-04 20:18:52
Score 0
Max Time N/A
Max Memory N/A

Compile Error

3nplus1.cpp: In function ‘int main()’:
3nplus1.cpp:9:24: error: lvalue required as left operand of assignment
9 | if(n > 1 and n % 2 = 1){
| ^
3nplus1.cpp:10:17: error: expected ‘;’ before ‘}’ token
10 | n = 3 * n + 1
| ^
| ;
11 | }
| ~
3nplus1.cpp:12:20: error: lvalue required as left operand of assignment
12 | else if (n % 2 = 1){
| ^
3nplus1.cpp:13:13: error: expected ‘;’ before ‘}’ token
13 | n = n / 2
| ^
| ;
14 | }
| ~