Problem | 3nplus1 |
---|---|
User | godex |
Submission Time | 2025-09-01 16:44:24 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
3nplus1.cpp: In function ‘int32_t main()’:
3nplus1.cpp:8:14: error: lvalue required as left operand of assignment
8 | if (n % 2 = 0){
| ^
3nplus1.cpp:9:10: error: expected ‘;’ before ‘cout’
9 | n = n/2
| ^
| ;
10 | cout >> n;
| ~~~~
3nplus1.cpp:12:3: error: expected ‘}’ before ‘else’
12 | else cout >> n;
| ^~~~
3nplus1.cpp:8:16: note: to match this ‘{’
8 | if (n % 2 = 0){
| ^
3nplus1.cpp:12:13: error: no match for ‘operator>>’ (operand types are ‘std::ostream’ {aka ‘std::basic_ostream<char>’} and ‘long long int’)
12 | else cout >> n;
| ~~~~ ^~ ~
| | |
| | long long int
| std::ostream {aka std::basic_ostream<char>}
3nplus1.cpp:12:13: note: candidate: ‘operator>>(int, long long int)’ <built-in>