Problem 3nplus1
User Denzio321
Submission Time 2023-02-01 16:28:46
Score 0
Max Time N/A
Max Memory N/A

Compile Error

3nplus1.cpp: In function ‘int main()’:
3nplus1.cpp:4:122: error: expected ‘;’ before ‘}’ token
4 | int main() {int n;cin >> n;bool run =true; while(run) {cout << n << "";if(n==1){break;}if (n%2==0){n = n/2;} else{n=3*n+1}}
| ^
| ;
3nplus1.cpp:4:123: error: expected ‘}’ at end of input
4 | int main() {int n;cin >> n;bool run =true; while(run) {cout << n << "";if(n==1){break;}if (n%2==0){n = n/2;} else{n=3*n+1}}
| ~ ^