Exact Change. Really going crazy trying to solve it

Exact Change. Really going crazy trying to solve it
0.0 0

#1

I am trying to solve it in a way i understand. Any help explaining how to go about it will be appreciated.


#2

What have you tried so far? What has worked and what hasn’t? What part of your code is behaving differently than you expect it to?