Skip to content

athenian-apcs/week-two-day-two-template-c3e74c

Repository files navigation

Week Two Day Two: Coin Change

This is a repository where you can write your code for today. You can also take notes in here if you wish. Please submit (commit and push) your code at the end of class, but note that your code will not be graded.

Your goal today is to write a program that finds the least number of coins necessary to make change. For instance, if we had $1.46, then the least coins we could give to make change would be 5 quarters, 2 dimes, and 1 penny for a total of 8 coins. Running our program would look something like this:

Please enter a number between 0.0 and 1000000.0
1.46
You will get 5 quarters, 2 dimes, 0 nickels, and 1 pennies.
You will have 8 coins in total.

Currently main contains some code to help you test your methods. Once you feel that your methods are working properly, you should adjust your code to produce the desired output that we see above.



Add code to MyMain.java to do the desired thing.

Run your code with:

The easiest way to run your code is to press the play button in MyMain.java.

However, you can also run your code by typing the following into the Terminal.

make run

Alternatively, if that doesn't work, use:

./gradlew run

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published