Problem 3nplus1
User Mineshafter61
Submission Time 2024-01-16 10:04:00
Score 0
Max Time N/A
Max Memory N/A

Compile Error

3nplus1.cpp: In function ‘int main()’:
3nplus1.cpp:3:45: error: ‘cout’ was not declared in this scope; did you mean ‘std::cout’?
3 | int main() {int a;std::cin>>a;while (a!=1) {cout<<a<<" ";if (a%2){a=3*a+1;}else{a=a/2;}}return 0;}
| ^~~~
| 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
| ^~~~