Problem 3nplus1II
User ShaquilleOatmeal34
Submission Time 2025-03-05 16:20:42
Score 0
Max Time N/A
Max Memory N/A

Compile Error

3nplus1II.cpp: In function ‘int main()’:
3nplus1II.cpp:12:6: error: ‘else’ without a previous ‘if’
12 | else{ a = 3*n+1;}
| ^~~~
3nplus1II.cpp:12:18: error: ‘n’ was not declared in this scope
12 | else{ a = 3*n+1;}
| ^
3nplus1II.cpp:14:13: error: ‘n’ was not declared in this scope
14 | cout <<n;
| ^
3nplus1II.cpp:18:3: error: expected ‘}’ at end of input
18 | }
| ^
3nplus1II.cpp:9:14: note: to match this ‘{’
9 | while(a!=1);{
| ^
3nplus1II.cpp:18:3: error: expected ‘}’ at end of input
18 | }
| ^
3nplus1II.cpp:5:15: note: to match this ‘{’
5 | signed main() {
| ^