Problem evenorodd
User innerspace777
Submission Time 2024-05-10 19:30:19
Score 0
Max Time N/A
Max Memory N/A

Compile Error

evenorodd.cpp: In function ‘int main()’:
evenorodd.cpp:5:13: error: expected primary-expression before ‘==’ token
5 | if (x % 2) == 0 {
| ^~
evenorodd.cpp:8:12: error: no match for ‘operator<<’ (operand types are ‘std::istream’ {aka ‘std::basic_istream<char>’} and ‘const char [4]’)
8 | std::cin << "Odd";
| ~~~~~~~~ ^~ ~~~~~
| | |
| | const char [4]
| std::istream {aka std::basic_istream<char>}
In file included from /usr/include/c++/9/bits/basic_string.h:48,
from /usr/include/c++/9/string:55,
from /usr/include/c++/9/bits/locale_classes.h:40,
from /usr/include/c++/9/bits/ios_base.h:41,
from /usr/include/c++/9/ios:42,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from evenorodd.cpp:1: