Problem 3nplus1
User pseudocoder101
Submission Time 2025-10-27 16:16:33
Score 0
Max Time N/A
Max Memory N/A

Compile Error

3nplus1.cpp: In function ‘ll s(ll)’:
3nplus1.cpp:11:10: error: ‘n’ was not declared in this scope; did you mean ‘n1’?
11 | n1 = 3*n +1;
| ^
| n1
3nplus1.cpp:15:10: error: expected ‘;’ before ‘int’
15 | return 0
| ^
| ;
16 |
17 | int main(){
| ~~~
3nplus1.cpp:17:11: error: a function-definition is not allowed here before ‘{’ token
17 | int main(){
| ^
3nplus1.cpp:22:2: error: expected ‘}’ at end of input
22 | }
| ^
3nplus1.cpp:9:7: note: to match this ‘{’
9 | }else{
| ^
3nplus1.cpp:22:2: error: expected ‘}’ at end of input
22 | }
| ^
3nplus1.cpp:5:12: note: to match this ‘{’
5 | ll s(ll n1){
| ^