By using this site, you agree to our Privacy Policy and our Terms of Use. Close

why a float? why care about a float being even or odd? if possible, cast it to int and do a bit and to check if the last bit is 0.