Problem evenorodd
User YChZhZ
Submission Time 2026-01-03 10:09:01
Score 0
Max Time N/A
Max Memory N/A

Compile Error

evenorodd.cpp: In function ‘int main()’:
evenorodd.cpp:9:16: error: no match for ‘operator==’ (operand types are ‘std::basic_ostream<char>’ and ‘int’)
9 | cout << n%2==0?"Even":"Odd";
| ~~~~~~~~~~~^~~
| | |
| | int
| std::basic_ostream<char>
evenorodd.cpp:9:16: note: candidate: ‘operator==(int, int)’ <built-in>
9 | cout << n%2==0?"Even":"Odd";
| ~~~~~~~~~~~^~~
evenorodd.cpp:9:16: note: no known conversion for argument 1 from ‘std::basic_ostream<char>’ to ‘int’
In file included from /usr/include/c++/9/regex:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:110,
from evenorodd.cpp:1:
/usr/include/c++/9/bits/regex.h:1026:5: note: candidate: ‘template<class _BiIter> bool std::__cxx11::operator==(const std::__cxx11::sub_match<_BiIter>&, const std::__cxx11::sub_match&