Question: C++ Write a function named makeChange() that takes two double input parameters, cost and amount, along with three int output parameters: quarters (25 cents), dimes

C++

Write a function named makeChange() that takes two double input parameters, cost and amount, along with three int output parameters: quarters (25 cents), dimes (10 cents) and cents. We'll skip using nickels (5 cent coins) for this problem. The cost is the cost of your purchases, and the amount is the amount you give to the cashier. Your function will calculate the change after subtracting the cost of the purchases from the amount. The output variables quarters, dimes and cents will be used for to return the coins and the return statement will be used to return the dollars

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!