Problem 3nplus1
User Tolo925kt
Submission Time 2026-03-06 08:50:24
Score 0
Max Time N/A
Max Memory N/A

Compile Error

3nplus1.cpp: In function ‘int main()’:
3nplus1.cpp:10:15: error: expected primary-expression before ‘)’ token
10 | for (n > 1;) {
| ^
3nplus1.cpp:10:15: error: expected ‘;’ before ‘)’ token
10 | for (n > 1;) {
| ^
| ;
3nplus1.cpp:11:12: error: lvalue required as left operand of assignment
11 | if (n%2 = 0) {
| ^
3nplus1.cpp:12:6: error: expected ‘;’ before ‘}’ token
12 | n / 2
| ^
| ;
13 | }
| ~
3nplus1.cpp:15:6: error: expected ‘;’ before ‘n’
15 | n * 3
| ^
| ;
16 | n + 1
| ~
3nplus1.cpp:22:3: error: expected ‘}’ at end of input
22 | }
| ^
3nplus1.cpp:3:13: note: to match this ‘{’
3 | int main () {
| ^