Problem 3nplus1
User coderccodes
Submission Time 2023-07-13 15:58:36
Score 0
Max Time N/A
Max Memory N/A

Compile Error

3nplus1.cpp: In function ‘int main()’:
3nplus1.cpp:10:7: error: expected ‘(’ before ‘n’
10 | if n % 2 == 0{
| ^
| (
3nplus1.cpp:12:6: error: expected ‘}’ before ‘else’
12 | } else{
| ^~~~
3nplus1.cpp:9:14: note: to match this ‘{’
9 | if (n != 1){
| ^
3nplus1.cpp:15:5: error: ‘else’ without a previous ‘if’
15 | } else{
| ^~~~
3nplus1.cpp:16:4: error: break statement not within loop or switch
16 | break;
| ^~~~~
3nplus1.cpp: At global scope:
3nplus1.cpp:19:2: error: expected unqualified-id before ‘return’
19 | return 0;
| ^~~~~~
3nplus1.cpp:20:1: error: expected declaration before ‘}’ token
20 | }
| ^