Problem

A third-grade teacher at Plano Elementary School wants a program that allows a student t...

A third-grade teacher at Plano Elementary School wants a program that allows a student to enter the amount of money a customer owes and the amount of money the customer paid. The program should calculate and display the amount of change, as well as how many dollars, quarters, dimes, nickels, and pennies to return to the customer. Display an appropriate message when the amount paid is less than the amount owed.

a. Create an IPO chart for the problem, and then desk-check the algorithm three times. For the first desk-check, use 75.34 and 80 as the amount owed and paid, respectively. For the second desk-check, use 39.67 and 50. For the third desk-check, use 10.55 and 9.75.

b. List the input, processing, and output items, as well as the algorithm, in a chart similar to the one shown earlier in Figure 5-32. Then code the algorithm into a program.

c. Desk-check the program using the same data used to desk-check the algorithm.

d. If necessary, create a new project named Advanced14 Project and save it in the Cpp7\Chap05 folder. Enter your C++ instructions into a source file named Advanced14.cpp. Also enter appropriate comments and any additional instructions required by the compiler. Display the change in fixed-point notation with two decimal places. Display the remaining output in fixed-point notation with no decimal places.

e. Save and run the program. Test the program using the same data used to desk-check the program.

REFERENCE : FIGURE 5-32

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
Solutions For Problems in Chapter 5
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT