help needed plz with some loop problem I guess
Hi, I have a problem.
I have to solve a problem, but I cant seem to work it out.
I have to give change to some amount.
I tried some loop things but I cant seem to make it work.
the problem is that I have to give back "money"( only in values of 50, 20 and 10) to any amount.
for example if someone types in 90 I have to give back 1x50, 2x20. if some one type in the number 96 the machine rounds up to 100 and have to give back 2x50. if someone types in 130 it will be 2x50, 1x20 and 1x10 so I always have to give back the highest possible value (50 , 20 or 10)
Can someone help me plz!!!