Problem | 3nplus1 |
---|---|
User | 2Princes1Lance |
Submission Time | 2023-11-22 15:53:29 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
3nplus1.cpp: In function ‘int main()’:
3nplus1.cpp:8:4: error: ‘cout’ was not declared in this scope; did you mean ‘std::cout’?
8 | cout << n;
| ^~~~
| 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:12:15: error: expected ‘;’ before ‘if’
12 | n = 3*n + 1
| ^
| ;
13 | if (n%2 == 0)
| ~~