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

...and that's why we ask you to use code tags when posting code.