Problem 3nplus1
User claireau
Submission Time 2023-11-08 14:32:02
Score 0
Max Time N/A
Max Memory N/A

Compile Error

3nplus1.cpp: In function ‘int main()’:
3nplus1.cpp:7:13: error: expected ‘;’ before ‘)’ token
7 | for (n != 1) {
| ^
| ;
3nplus1.cpp:9:2: error: expected primary-expression before ‘if’
9 | if (n%2 == 0)
| ^~
3nplus1.cpp:8:19: error: expected ‘;’ before ‘if’
8 | cin >> n;}
| ^
| ;
9 | if (n%2 == 0)
| ~~
3nplus1.cpp:9:2: error: expected primary-expression before ‘if’
9 | if (n%2 == 0)
| ^~
3nplus1.cpp:8:19: error: expected ‘)’ before ‘if’
8 | cin >> n;}
| ^
| )
9 | if (n%2 == 0)
| ~~
3nplus1.cpp:7:6: note: to match this ‘(’
7 | for (n != 1) {
| ^