Problem 3nplus1
User blank
Submission Time 2025-01-20 17:36:05
Score 0
Max Time N/A
Max Memory N/A

Compile Error

3nplus1.cpp: In function ‘int main()’:
3nplus1.cpp:6:5: error: expected ‘(’ before ‘n’
6 | if n%2 {cout << n/2;}
| ^
| (
3nplus1.cpp:7:2: error: ‘else’ without a previous ‘if’
7 | else {cout << 3n+1}
| ^~~~
3nplus1.cpp:7:16: error: unable to find numeric literal operator ‘operator""n’
7 | else {cout << 3n+1}
| ^~