Question: Using C++ Part 2 - Cash.cpp Write a function called SortCash() that has eight (8) parameters. The first parameter should be a pass by value

Using C++

Part 2 - Cash.cpp

Write a function called SortCash() that has eight (8) parameters. The first parameter should be a pass by value integer that represents a total dollar amount. The remaining seven parameters should also be integers but passed by reference. These reference parameters will represent standard Canadian currency amounts: hundred dollar bills, fifty dollar bills, twenties, tens, fives, toonies and loonies, respectively in that order.

The function should convert the total dollar amount into the least number of equivalent bills/coins. Using references, the function should directly alter the respective arguments of the calling function. This function should only handle processing. Input and output to the console should not be in this function.

Include the function in a working program which prompts the user for the total dollar amount and shows them the list of equivalent bill/coin quantities. Loop this IPO structure 3 times. Be sure to validate for non-numeric input by including the MyInputValidation.h custom header file. The minimum allowable dollar amount is one (1), the maximum is one thousand (1000).

 Using C++ Part 2 - Cash.cpp Write a function called SortCash()

Cash.cpp: Please ente a total dolla amount 456 umber of Loonies: umber of Toonies: umber of Fives: umber of Tens: unber of Twenties: umber of Fifties: umber of Hundreds: 0 lease enter a total dollar amount 37 unber of Loonies: unber of Toonies: unber of Fives: unber of Tens umber of Twenties: umber of Fifties umber of Hundreds: 0 0 Please ente a total dollar amount: 212 unber of Loonies: mber of Toonies: umber of Fives: umber of Tens: umber of Twenties: umber of Fifties: unber of Hundreds 0 0 0 0 Press any key to continue

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!