Equation not working properly.

Thanks to both of you!! :smiley:

jremington:
You should read up on the rules for integer division.
The correct result of dividing 1000 by 1123 is zero.

guix:
Welcome :slight_smile:

As jremington said, maybe not clearly, the result of 1000/1123 ( = 0.89 ) is truncated because of integer division, so it returns 0 (and the other division as well) :slight_smile:

The solution is simple: divide by a float instead of an int.

I wont tell :wink: I figured it out from the other posts as well, thanks! :slight_smile:

vaj4088:
(I hope that I do not get into too much trouble for having handed you an answer.)