When you divide two integers, C++ discards the fractional part. int result = 7 / 2; stores 3, not 3.5. The remainder vanishes, which breaks calculations expecting decimals. Truncation always rounds toward zero.
int a = -7 / 2; stores -3, not -4. If your algorithm relies on rounding rules, integer division produces wrong answers. To get the full decimal result, at least one operand must be floating-point.
double result = 7.0 / 2; stores 3.5. C++ converts the int to double before dividing.