Problem 3nplus1
User oilershub
Submission Time 2026-02-14 18:18:47
Score 0
Max Time N/A
Max Memory N/A

Compile Error

3nplus1.cpp: In function ‘int main()’:
3nplus1.cpp:3:5: error: ‘cin’ was not declared in this scope
3 | cin >> n;
| ^~~
3nplus1.cpp:4:5: error: ‘cout’ was not declared in this scope
4 | cout << n;
| ^~~~
3nplus1.cpp:5:16: error: expected ‘;’ before ‘)’ token
5 | for (n != 1) {
| ^
| ;
3nplus1.cpp:13:13: error: ‘endl’ was not declared in this scope
13 | cout << endl;
| ^~~~
3nplus1.cpp:14:5: error: expected primary-expression before ‘return’
14 | return 0;
| ^~~~~~
3nplus1.cpp:13:18: error: expected ‘)’ before ‘return’
13 | cout << endl;
| ^
| )
14 | return 0;
| ~~~~~~
3nplus1.cpp:5:9: note: to match this ‘(’
5 | for (n != 1) {
| ^