integer arithmetic does not return a fractional part. The result is truncated: 9/12 = 0, 5/2 = 2

If you want decimal points, use a double in the arithmetic expression: 9.0/12 = .75, 5.0/2 =...