Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

how do I write a program which will input tha amount of the purchase and the amount tendered?

0 views
Skip to first unread message

Robert

unread,
Mar 2, 2010, 1:11:52 PM3/2/10
to
Hi everyone, as I said before I want to write a program which will input
the amount of the purchase and the amount tendered. It will then calculate
and display exactly how the change is to be made. The output will instruct
the employee how many 50 dollars bills, 20 dollar bills, 10 dollars bill, 5
dollar bills, one dollar bills, 50 cent pieces, quarters, dimes, nickels and
pennies they are to return to the customer. The resulting change should be
the minimum number of bills and coins required the output will display all
denominations.

Assume that the amount tendered is always larger than the purchase price.
Don't worry about error checking.

GOALS

Develop an effective algorithm based on the typical data processing sequence
of Input Process and Output.

Understand the implementation of a "prompt and read" sequence using the
"cout" and "cin" functions.

Use meaningfully named variables and constants and understand the
differences of how they are used.

Properly use integer division (/) and (%) operators as discussed in class to
complete the project

know when variables must be initialized before use and know the various
locations where this may be.

0 new messages