Hello Community,
before I reinvent the wheel, I wanted to find out if there is an algorithm that randomly divides an amount of money into bills and coins.
e.g. I have an amount of 125.50€.
possible 1st division:
€100 = 1
€50 = 0
€20 = 1
€10 = 0
€5 = 1
€2 = 0
€1 = 0
€0.5 = 0
€0.2 = 2
€01 = 1
possible 2nd division:
€100 = 0
€50 = 2
€20 = 1
€10 = 0
€5 = 1
€2 = 0
€1 = 0
€0.5 = 1
€0.2 = 0
€01 = 0
It is important that the distribution must be random. Could someone give me some advice or is that too complicated?
thanks in advance for the help and advice.
Best regards