Problem 3nplus1
User Elias
Submission Time 2026-06-22 16:54:25
Score 0
Max Time N/A
Max Memory N/A

Compile Error

3nplus1.cpp: In function ‘int main()’:
3nplus1.cpp:9:16: error: expected ‘)’ before ‘{’ token
9 | if(n / 2 == 0{
| ~ ^
| )
3nplus1.cpp:12:21: error: expected statement at end of input
12 | cout << 3n+1 << '/n'
| ^~~~
3nplus1.cpp:12:21: error: expected ‘}’ at end of input
3nplus1.cpp:8:16: note: to match this ‘{’
8 | while(n != 1){
| ^
3nplus1.cpp:12:21: error: expected ‘}’ at end of input
12 | cout << 3n+1 << '/n'
| ^~~~
3nplus1.cpp:7:29: note: to match this ‘{’
7 | for(int i = 1; i <= n; i++){
| ^
3nplus1.cpp:12:21: error: expected ‘}’ at end of input
12 | cout << 3n+1 << '/n'
| ^~~~
3nplus1.cpp:5:15: note: to match this ‘{’
5 | signed main() {
| ^