Quote:
It will show like "Amount of banknotes
1000 banknote : -45
500 banknote : 30
100 banknote : 300"
How can I fix it, I want it to show "Amount of banknotes
1000 banknote : 0
500 banknote : 0
100 banknote : 0"
Your problem is that when you calculate the number of banknotes you need, you forget to check that you have enough of each kind.
As already adviced, use the debugger to see what your code is doing.