I am trying to write a program that tells the minium number of coins to give out for any amount of change from 1 cent to 99 cents. For example if the amount is 57 cents in the commmand prompt, the output would be:
57 cents can be given as
2 quarters, 1 nickel and 2 pennies.
while using coins 25, 10, 5, and 1
I am thinking
int computeCoin(coi nValue,):
//Precondition: 0<coinValue<100 ;
//Postconditionre turned value has been set to equal the max number of coins
//returnedValue*c oinValue
??????????????? ????
57 cents can be given as
2 quarters, 1 nickel and 2 pennies.
while using coins 25, 10, 5, and 1
I am thinking
int computeCoin(coi nValue,):
//Precondition: 0<coinValue<100 ;
//Postconditionre turned value has been set to equal the max number of coins
//returnedValue*c oinValue
??????????????? ????
Comment