Problem 3nplus1
User SMILE
Submission Time 2024-04-13 11:42:55
Score 0
Max Time N/A
Max Memory N/A

Compile Error

3nplus1.cpp: In function ‘int main()’:
3nplus1.cpp:8:9: error: expected ‘;’ before ‘if’
8 | cin>>n
| ^
| ;
9 | if(n%2=0){
| ~~
3nplus1.cpp:11:4: error: ‘else’ without a previous ‘if’
11 | }else if(n%2=1){
| ^~~~
3nplus1.cpp:11:16: error: lvalue required as left operand of assignment
11 | }else if(n%2=1){
| ^
3nplus1.cpp:12:10: error: unable to find numeric literal operator ‘operator""n’
12 | cout<<3n+1;
| ^~
3nplus1.cpp:16:1: error: expected ‘}’ at end of input
16 | }
| ^
3nplus1.cpp:4:11: note: to match this ‘{’
4 | int main(){
| ^