Exchanging coins problem from DP section

https://ide.codingblocks.com/s/220593.What’s the problem with the code


here is the correct code for the problem
coins can be changed only when they are a multiple of the number. and not always, plus u need to check, whether now to exchange coins or break down further