Fix the Error: Check Whether a Given Number Is Odd

Published by MattDESTROYER in

Éowyn has written the function IsOdd() to check if a given number is odd or not. Unfortunately, the function does not return the correct result for all the inputs. Help her fix the error.

Examples

IsOdd(-5) ➞ true

IsOdd(25) ➞ true

IsOdd(0) ➞ false

Notes

All the inputs will only be integers.

Watch a quick demo on how Edabit works.