If you have {{l}} coins,
and want to buy items that cost {{r}} coins each,
you could only buy {{wholes}} item
s
,
meaning you would only spend {{wholes*r}} coins ({{wholes}}x{{r}}),
and still have
{{m}}
coin
s
left, the remainder ({{l}}-{{wholes*r}}).
If you have {{l}} coins,
and want to buy items that cost {{r}} coins each,
you could buy exactly {{wholes}} item
s
,
but then you would have
{{m}}
coins left
If you prefere, you could also think of it as fractions: