09.01.2016, 17:04
Take note: integer divided by integer remains integer. Any would-be fractional part is discarded. Use floating point arithmetic to do the calculation (this can be as simple as adding .0 to the operands). Then use floatround to save the value to their account.