Thanks to both of you!! ![]()
jremington:
You should read up on the rules for integer division.
The correct result of dividing 1000 by 1123 is zero.
guix:
WelcomeAs 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)
The solution is simple: divide by a float instead of an int.
I wont tell
I figured it out from the other posts as well, thanks! ![]()
vaj4088:
(I hope that I do not get into too much trouble for having handed you an answer.)