1 point
*
Deleted by creator
2 points
*
Good solution! I think you should show the last 3 lines that makes it work tho. FIFY:
private bool IsEven(int number){
if (number == 1) return false;
else if (number == 2) return true;
else if (number == 0) return true;
else if (number == -1) return false;
else return !IsEven(abs(number) - 1);
}
1 point
bool isEven(int num) {
return !isOdd(num);
}
bool isOdd(int num) {
return !isEven(num);
}
2 points
Those companies that judge output by lines of code are asking for this
2 points
Not sure why people still implement this themselves when there are APIs that will do it for you, like https://isevenapi.xyz/