1. Write a main function that prompts the user to input amount due (double amt_d), and amount paid (double amt_p) in the unit of dollar, then calls a function change( ) whose input parameters are amt_d and amt_p, and which outputs how many dollars, quarters, dimes, nickles and pennies are given as change. For example, if amt_d = 3.14 dollars and amt_p = 4 dollars, the change is 0 dollars, 3 quarters, and 1 cent. The main function should print out the change in dollars, quarters, etc.
sort by best latest