Problem 3nplus1
User audreytan
Submission Time 2026-04-10 17:33:59
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 ‘else’
8 | n=n/2
| ^
| ;
9 | else {
| ~~~~
3nplus1.cpp:15:1: error: expected ‘}’ at end of input
15 | }
| ^
3nplus1.cpp:7:14: note: to match this ‘{’
7 | if (n%2==0){
| ^
3nplus1.cpp:15:1: error: expected ‘}’ at end of input
15 | }
| ^
3nplus1.cpp:6:13: note: to match this ‘{’
6 | while(n!=1){
| ^
3nplus1.cpp:15:1: error: expected ‘}’ at end of input
15 | }
| ^
3nplus1.cpp:3:11: note: to match this ‘{’
3 | int main(){
| ^