Problem 3nplus1
User AustinPi
Submission Time 2024-04-12 17:20:34
Score 0
Max Time N/A
Max Memory N/A

Compile Error

3nplus1.cpp: In function ‘int main()’:
3nplus1.cpp:8:12: error: expected ‘;’ before ‘if’
8 | cout << x
| ^
| ;
9 | if (x % 2) {
| ~~
3nplus1.cpp:11:8: error: ‘else’ without a previous ‘if’
11 | } else {
| ^~~~
3nplus1.cpp:12:13: error: expected ‘;’ before ‘}’ token
12 | x /= 2
| ^
| ;
13 | }
| ~
3nplus1.cpp:14:12: error: expected ‘;’ before ‘}’ token
14 | cout << 1
| ^
| ;
15 | }
| ~