Problem 3nplus1
User angelahaha
Submission Time 2023-11-08 13:57:54
Score 0
Max Time N/A
Max Memory N/A

Compile Error

3nplus1.cpp: In function ‘int main()’:
3nplus1.cpp:8:8: error: expected ‘(’ before ‘n’
8 | while n != 1;{
| ^
| (
3nplus1.cpp:8:14: error: expected ‘)’ before ‘;’ token
8 | while n != 1;{
| ~ ^
| )
3nplus1.cpp:9:5: error: expected ‘(’ before ‘n’
9 | if n%2=0;
| ^
| (
3nplus1.cpp:11:2: error: ‘else’ without a previous ‘if’
11 | else 3*n+1 }
| ^~~~
3nplus1.cpp:11:12: error: expected ‘;’ before ‘}’ token
11 | else 3*n+1 }
| ^~
| ;