Problem 3nplus1
User ndgsghdj
Submission Time 2025-04-15 12:06:04
Score 0
Max Time N/A
Max Memory N/A

Compile Error

3nplus1.cpp: In function ‘int main()’:
3nplus1.cpp:10:6: error: expected ‘(’ before ‘!’ token
10 | if !(d % 2) d /= 2;
| ^
| (
3nplus1.cpp:11:3: error: ‘else’ without a previous ‘if’
11 | else d = 3*d + 1;
| ^~~~
3nplus1.cpp:13:18: error: expected ‘;’ before ‘return’
13 | } while (d != 1)
| ^
| ;
14 | return 0;
| ~~~~~~