, , , ,

[SOLVED] Cs2070 assignment 4: coin change

$25

File Name: Cs2070_assignment_4__coin_change.zip
File Size: 301.44 KB

5/5 - (1 vote)

If I tell you that I have 73 cents in American coins in my pocket and that I have the fewest number of coins possible, what combination of coins do I have? It turns out that I have 2 quarters (25 cents each), 2 dimes (10 cents each), 0 nickels (5 cents each), and 3 pennies (1 cent each).This very simple algorithm will always find the amount of change which equals a value using the smallest number of coins:numberOfQuarters = total / quarterValue
total = total mod quarterValue
numberOfDimes = total / dimeValue
total = total mod dimeValue
numberOfNickels = total / nickelValue
total = total mod nickelValue
numberOfPennies = total / pennyValueName your project FirstnameLastnameAssignment4Have your program do the following.Your source code must include the following documentation:Not yet, but this should be enough to go on.To turn in your application, find the folder containing your entire project (not the folder with the “java” file), zip it up, and turn it in.

Shopping Cart
[SOLVED] Cs2070 assignment 4: coin change
$25