Rounding integer division (instead of truncating) January 7, 2023 by Tarik The standard idiom for integer rounding up is: int a = (59 + (4 - 1)) / 4; You add the divisor minus one to the dividend.