Question: Code pref in C++ please 11THE MAKING CHANGE PROBLEM Write a function named makeChange() that takes two double input parameters, cost and amount, along with

Code pref in C++ please  Code pref in C++ please 11THE MAKING CHANGE PROBLEM Write a

11THE MAKING CHANGE PROBLEM 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. Here's an example. Your purchases are S1.08 and you pay with a S5.00 bill. Your change is: int quarters, dimes, cents int dollars makeChange(1.08, 5.00, quarters, dimes, cents); cout

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!