Yes.
The integer division operator /
and the remainder operator %
take an integer apart.
theInteger / divisor quotient theInteger % divisor remainder
The original integer can be put back together again:
quotient * divisor + remainder theInteger
In many calculations, it is convenient to do everything with integers,
so both /
and %
are needed.
If you exchange 372 pennies for dollar bills, how many bills do you get? How many pennies are left over?