Question: Create a program that determines whether or not it is possible to construct a particular total using a specific number of coins. For example, it

Create a program that determines whether or not it is possible to construct a particular total using a specific number of coins. For example, it is possible to have a total of $1.00 using four coins if they are all quarters. However, there is no way to have a total of $1.00 using 5 coins. Yet it is possible to have $1.00 using 6 coins by using 3 quarters, 2 dimes and a nickel. Similarly, a total of $1.25 can be formed using 5 coins or 8 coins, but a total of $1.25 can not be formed using 4,6 or 7 coins.
Your program should read both the dollar amount and the number of coins from
the user. It should display a clear message indicating whether or not the entered dollar amount can be formed using the number of coins indicated. Assume the existence of quarters, dimes, nickels, and pennies when completing this problem. Your solution must use recursion. It can not contain any loops.
Just exactly same question, but I want to know if I want to solve if it's possible to make the total amount using a certain number of coins, how I can do that. And also if I want to know the minimum way of consturcting the amount using these numbers, how I can do that.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!