240 / 10 = 23,9999

You just need to cast your float to integer and then do the operations.