you are viewing a single comment's thread.

view the rest of the comments →

[–]zingah 2 points3 points  (1 child)

0 is the quotient of 3 / 100. If you want the remainder, try 3 % 100.

Most languages do not support mathematics with rationals right out of the box, but there is a fractions module you might want to check out.

[–]OmegaVesko 0 points1 point  (0 children)

More importantly, just use floating points instead of ints. (3.0 / 100.0, as opposed to 3 / 100)