Make Change program - C++ Write a program to input two float values. The first f
ID: 668314 • Letter: M
Question
Make Change program - C++
Write a program to input two float values. The first float is the cost of some purchase made, or the cost of goods, and the second is the payment value towards the cost. You are to determine the change (if any) to return to the customer. You must also determine if they gave you enough money to cover the cost, if they didn't, print out you are short on funds, so pay more.
The change should be the number of 20 dollar bills to return, then the number of 10's, 5's, and 1's in bills. Then the change for coins, the number of 50 cents, .25 cents (quarters), 10 cents (dimes), 5 cents (nickels), and pennies. DO NOT print out 0 for any of the above values (if they don't get any 20 dollar bills back, don't print "0 20 dollar bills". You just don't print anything.)
Print out the 'cost' and the 'payment' and then the amount of change to return.
Example:
0.81 1.00
Example output:
purchase pay change
0.81 1.00 1 dime, 1 nickel, 4 pennies
NOTE: Can't use arrays or classes yet as we haven't covered them.