@jono33,
I borrow twice $50 from 2 friends = 100 from each friend = 200
Pay for dinner 97
= 103.00 left.
I return twice $1 to both of my friends = 2.00 to each friend = $4.00
now you have 99.00 left
You owe 49.50 to each friend.
Dinner for 3 @ 97 = 32.33r
your share of dinner = 32.33/2 = 16.16+49.50 = $65.66
you owe 65.66 to each friend.
65.66+their meal = 97.99.
If tey are really friends they wont care abot the 2 cent rounding.
nothing missing, nothing left over.