invalid operands of types 'float' and 'int' to binary 'operator%'

is there a way to make it so it works with float datatypes?

Your question doesn't make any sense.

Is 2.35 odd or even?

How about 3.2?