I'm trying to write a program where users are able to split mixed bills and find out who has to pay how much, as well as each user should know how much owes to which user/users, number of users can be as much as users wishes to have,
for instance:
user a = 100$
user b = 25$
user c = 50$
user d = 75$
user e = 250$
total equals 500$ and each user should pay 100$, hence the program should calculate as:
user b has to pay: 75$ to user a, user c has to pay: 50$ to user e, user d has to pay: 25$ to user e,
looking forward for any help.