Problem

In this exercise, you will create a program that converts U.S. dollars to a different cu...

In this exercise, you will create a program that converts U.S. dollars to a different currency. The number of American dollars should always be an integer that is greater than or equal to zero. The currencies and exchange rates are listed in Figure 6-52. The user should be allowed to choose the currency. Hint: Designate a code for each currency and use cout statements to display a menu that lists each code and its corresponding currency.

a. Create an IPO chart for the problem, and then desk-check the algorithm nine times. For the first seven desk-checks, convert 10 American dollars to each of the seven different currencies. For the eighth desk-check, test the algorithm using –3 as the number of American dollars. For the last desk-check, test the algorithm using an invalid currency code.

b. List the input, processing, and output items, as well as the algorithm, in a chart similar to the one shown earlier in Figure 6-47. 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 Advanced17 Project and save it in the Cpp7\ Chap06 folder. Enter your C++ instructions into a source file named Advanced17.cpp. Also enter appropriate comments and any additional instructions required by the compiler. Display the results in fixed-point notation with two decimal places.

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

REFERENCE: FIGURE 6-47

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 6
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