An idea for a September Challenge of the Month
When the Euro become the currency of most European Countries (as my, Greece), one problem occurs when my company wants to pay parttime Employees in cash two times a month.
The salaries was exact amounts, 150000 grd 140000 grd etc ..
150000= 15 x 10000 (banknote of 10000 grd)
140000= 14 x 10000 (banknote of 10000 grd)
But in Euro not
150000 grd=440,21 Euro
140000 grd=410,86 Euro
440,21 = 8x50 + 2x20 +1x0,20 + 1x0,01
410,86 = 8x50 + 1x10 +1x1 +1x0,50 + 1x0,20 + 1x0,10 +1x0,05 + 1x0,01
(if we convert them to dollars the problem is the some)
The Company wants to enclose to an envelope the salary with the minimum banknotes and coins
Euro banknotes
1x500 euro
1x200 euro
1x100 euro
1x500 euro
1x20 euro
1x10 euro
1x5 euro
Coins
1x5 euro
1x2 euro
1x1 euro
1x0,50 cents
1x0,20 cents
1x0,10 cents
1x0,05 cents
1x0,02 cents
1x0,01 cents
The problems are 3 :
1:If we don't have any banknotes and coins, how many banknotes and coins must get it from the Bank to make the pays ?
2:if we have some of them how many envelopes we can make ?
3:If we want not to pay with banknotes of 500 or (and) 200 etc ? or the BANK do not have any banknotes of 500 or (and) 200 etc ?
The salaries are change every 15 days since they are parttime
We want to make a macro too split the salaries to minimum banknotes and coins and solve the three problems above .(Use random salaries, use local currency)
(sorry if my english is not so good)