Quote (irimi @ 29 Nov 2012 17:05)
yeah i'm not even bothering with looking at your code. i'm kind of assuming it's wrong.
you have to figure out the abstract solution before implementing it. doing it in reverse is a guaranteed waste of time.
I have the solution and it works I just need to know if/how you can branch a a case to another while keeping the course.
my code at the moment removes quarters > dimes > nickels > pennies
the problem is that it will never give a solution like quarters + pennies or dimes + pennies
I have checked to see if I comment out the dimes and nickels and it works to give me quarters + pennies so if I could find a way to have it branch to case 1 for example while retain it's initial order I'd be set.
basically the only thing my code cannot do are cases for the following
Quarters Dimes Pennies
Dimes Pennies
Quarters Pennies
I am pretty sure
The solution is easy enough to understand it's just the implementation that I really am having trouble with.
I think I am just going to make special functions with their own switch statements in the different orders that return an int of ways to add to the sum, it's ugly but it works.
This post was edited by Nom_Nomz on Nov 29 2012 03:30pm