|You could of course take the smallest unit - in this case : 1 cent - as your basic unit. So, you express everything in cents, like 1 cent, 2 cents, 50 cents, 100 cents ... and when displaying, you convert cents to dollars. That way, you don't need to use any decimal, nowhere. |
Of course, you need to see if the max (and min) value is within the range you need.