Question: Write a program named changeDue 1 . cpp to calculate change due in a transaction using these U . S . bills no cents: $

Write a program named changeDue1.cpp to calculate change due in a transaction using these U.S.
bills no cents:
$1 $2 $5 $10 $20 $50
$100 $500 $1,000 $5,000 $10,000 $100,000
For example, a cash payment of $45,000 is made by tendering a $100,000 bill. The change due
is $55,000. Its paid out in five $10,000 bills, and one $5,000 bill.
In another example, a cash payment of $44,999 is made by tendering five $10,000 bills. The change
due is $5,001. Its paid out in one $5,000 bill, and one $1 bill.
Requirements:
1. Write this program by copying, pasting, and completing the starting point provided below.
Name the variables as you wish.
2. The cash payment is always less than or equal to the amount tendered.
3. The cash payment cannot be zero or negative.
4. The paid out bills should include the fewest number of bills. That is, dont include two $10 bills
when you can include one $20 bill instead.
5. Include a label with any statement that outputs a variables value.
Algorithm. This is only a partial algorithm, to calculate the number of bills of a certain denomination
to be paid out. For example, for $100 bills to be paid out:
Divide the change due by 100 to get the number of $100 bills in the change.
Recalculate the change due as the remainder in the above division problem.
...
Output the number of $100 bills, with a label.
Program I/O. Input: 2 programmer-assigned whole number values of your choosing, for the cash
payment and for the amount tendered Output: The change due and the numbers of each
specified denomination to be paid out.

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 Programming Questions!