Problem | 3nplus1 |
---|---|
User | JAMALSGOODATROBOTICS |
Submission Time | 2025-01-15 21:01:31 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
3nplus1.cpp: In function ‘int main()’:
3nplus1.cpp:8:17: error: lvalue required as left operand of assignment
8 | if (n & 2 = 0){
| ^
3nplus1.cpp:9:14: error: ‘i’ was not declared in this scope
9 | for (i = 0; i != 1; i++){
| ^
3nplus1.cpp:10:13: error: ‘cout’ was not declared in this scope; did you mean ‘std::cout’?
10 | cout << n/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:13:14: error: ‘i’ was not declared in this scope
13 | for (i = 0; i != 1; i++){
| ^
3nplus1.cpp:14:13: error: ‘cout’ was not declared in this scope; did you mean ‘std::cout’?
14 | cout << 3 * n + 1;
|