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 changeDuecpp to calculate change due in a transaction using these US
bills no cents:
$ $ $ $ $ $
$ $ $ $ $ $
For example, a cash payment of $ is made by tendering a $ bill. The change due
is $ Its paid out in five $ bills, and one $ bill.
In another example, a cash payment of $ is made by tendering five $ bills. The change
due is $ Its paid out in one $ bill, and one $ bill.
Requirements:
Write this program by copying, pasting, and completing the starting point provided below.
Name the variables as you wish.
The cash payment is always less than or equal to the amount tendered
The cash payment cannot be zero or negative.
The paid out bills should include the fewest number of bills. That is dont include two $ bills
when you can include one $ bill instead.
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 $ bills to be paid out:
Divide the change due by to get the number of $ bills in the change.
Recalculate the change due as the remainder in the above division problem.
Output the number of $ bills, with a label.
Program IO Input: programmerassigned 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
