Problem 3nplus1
User godex
Submission Time 2025-09-01 16:44:40
Score 0
Max Time N/A
Max Memory N/A

Compile Error

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:14:12: error: no match for ‘operator>>’ (operand types are ‘std::ostream’ {aka ‘std::basic_ostream<char>’} and ‘long long int’)
14 | else cout >> n;}
| ~~~~ ^~ ~
| | |
| | long long int
| std::ostream {aka std::basic_ostream<char>}
3nplus1.cpp:14:12: note: candidate: ‘operator>>(int, long long int)’ <built-in>
14 | else cout >> n;}
| ~~~~~^~~~
3nplus1.cpp:14:12: note: no known conversion for argument 1 from ‘std::ostream’ {aka ‘std::basic_ostream<char>’} to ‘int’
In file includ