Bill wrote:
.7 can't be stored exactly as such as a floating point number on a
typical modern computer.
Someone "casted" the number to an integer, losing what what stored as
a fraction.
They used: (int)(average)
when they should have used: (int)(average+.5).
The latter would have rounded.
Wouldn't have had that problem if they had written the program in COBOL!
--
-Mike-