Rounding in an array
I have an array in which a number is multiplied by a percentage and then
those numbers are eventually totalled up. Example: 250*50% = 125,
250*25%=62.5, 250*25%=62.5, 125+62.5+62.5=250.
The question I have is: is there any way to have only integers displayed
throughout this process and still keep the correct total? When I try using
the round function now my total is off by 1. Any suggestions?
|