Cephus� wrote: > I am trying to remember the "golden rule" for integer division > rounding. > > I am trying to average something (both integers) and I can't remember > how to round without using floating point. > > Like say I am trying to divide 26/3 --- I would get 8 remainder 2 > > but that should round up to 9. How can I do this? I know it has > something to do with the dividend....but I can't for the life of me > remember. thanks! > > Beau I figured it out. Thanks for the help (although I was asking how to do something, not the code to do it, usually you would never get that in a newsgroup). All you do is REM the divisor and dividend. Then double it. If that number is greater than the divisor, then add one. Otherwise don't... Beau