Problem 3nplus1
User pseudocoder101
Submission Time 2025-10-27 16:16:06
Score 0
Max Time N/A
Max Memory N/A

Compile Error

3nplus1.cpp: In function ‘ll s(ll)’:
3nplus1.cpp:6:3: error: ‘cout’ was not declared in this scope; did you mean ‘std::cout’?
6 | cout<<n1/2<<' ';
| ^~~~
| std::cout
In file included from 3nplus1.cpp:1:
/usr/include/c++/9/iostream:61:18: note: ‘std::cout’ declared here
61 | extern ostream cout; /// Linked to standard output
| ^~~~
3nplus1.cpp:7:12: error: expected ‘;’ before ‘}’ token
7 | n1 = n1/2
| ^
| ;
8 | }else{
| ~
3nplus1.cpp:9:3: error: ‘cout’ was not declared in this scope; did you mean ‘std::cout’?
9 | cout<<(3*n1+1)<<" ";
| ^~~~
| std::cout
In file included from 3nplus1.cpp:1:
/usr/include/c++/9/iostream:61:18: note: ‘std::cout’ declared here
61 | extern ostream cout; /// Linked to standard output
| ^~~~
3nplus1.cpp:10:10: