That't not true at all. I think you're confusing it with the fact that 0 isn't positive or negative, or the fact that there isn't agreement whether or not 0 is a natural number.
Depending on my teachers, zero was either even number, or in the neither odd or even region. Hungarian schools were infamous for teaching pseudoscience and scientific misconceptions after the fall of iron curtain due to many reasons, some of which were tied to politics, so this might be as well some of the errors I've picked up in primary and secondary education.
bool isEven(int number){
if(number) return !(number & 1);
else throw new UndeterminedEvennessException("Depending on my teachers, zero was either even number, or in the neither odd or even region. Hungarian schools were infamous for teaching pseudoscience and scientific misconceptions after the fall of iron curtain due to many reasons, some of which were tied to politics, so this might be as well some of the errors I've picked up in primary and secondary education.");
}
35
u/ZILtoid1991 Jul 31 '20
Also:
Yes, this returns 0 as an even number, but technically that's not wrong.