Problem 3nplus1II
User vadar2525
Submission Time 2025-03-05 15:42:28
Score 0
Max Time N/A
Max Memory N/A

Compile Error

3nplus1II.cpp: In function ‘int main()’:
3nplus1II.cpp:16:3: error: expected ‘}’ before ‘else’
16 | else if(n = 0)
| ^~~~
3nplus1II.cpp:12:17: note: to match this ‘{’
12 | if(n % 2 == 0){
| ^
3nplus1II.cpp:17:18: error: expected ‘;’ before ‘}’ token
17 | cout << " -1 "
| ^
| ;
18 | }else{
| ~
3nplus1II.cpp:18:4: error: ‘else’ without a previous ‘if’
18 | }else{
| ^~~~
3nplus1II.cpp: At global scope:
3nplus1II.cpp:28:1: error: expected declaration before ‘}’ token
28 | }
| ^