Problem 3nplus1
User angelahaha
Submission Time 2023-11-08 13:59:37
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:12:2: error: ‘else’ without a previous ‘if’
12 | else {3*n+1
| ^~~~
3nplus1.cpp:12:13: error: expected ‘;’ before ‘}’ token
12 | else {3*n+1
| ^
| ;
13 | }
| ~
3nplus1.cpp:15:1: error: expected ‘}’ at end of input
15 | }
| ^
3nplus1.cpp:4:11: note: to match this ‘{’
4 | int main(){
| ^