Problem 3nplus1
User Tolo925kt
Submission Time 2026-03-06 08:49:12
Score 0
Max Time N/A
Max Memory N/A

Compile Error

3nplus1.cpp: In function ‘int main()’:
3nplus1.cpp:8:3: error: expected ‘}’ before ‘else’
8 | else {
| ^~~~
3nplus1.cpp:6:12: note: to match this ‘{’
6 | if (n = 1){
| ^
3nplus1.cpp:9:14: error: expected ‘;’ before ‘)’ token
9 | for (n > 1) {
| ^
| ;
3nplus1.cpp:20:4: error: expected primary-expression before ‘return’
20 | return 0;
| ^~~~~~
3nplus1.cpp:19:11: error: expected ‘)’ before ‘return’
19 | cout << n;
| ^
| )
20 | return 0;
| ~~~~~~
3nplus1.cpp:9:8: note: to match this ‘(’
9 | for (n > 1) {
| ^
3nplus1.cpp:21:3: error: expected ‘}’ at end of input
21 | }
| ^
3nplus1.cpp:3:13: note: to match this ‘{’
3 | int main () {
| ^