Karlton Learning wants a program that displays the amount of money a company owes for a seminar.

Question:

Karlton Learning wants a program that displays the amount of money a company owes for a seminar. The fee per person is based on the number of people the company registers, as shown in Figure 6-42. For example, if the company registers seven people, then the total amount owed is $700. If the user enters a number that is less than or equal to 0, the program should display an appropriate error message.

Number of registrants                 Fee per person

1 through 5 ........................................      $125

6 through 20 .......................................    $ 100

21 or more ..........................................    $    75

Figure 6-42

a. Create an IPO chart for the problem, and then desk-check the algorithm five times, using the numbers 4, 8, 22, 0, and –2 as the number of people registered.

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-27. 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 Introductory13 Project, and save it in the Cpp8\Chap06 folder. Enter your C++ instructions into a source file named Introductory13.cpp. Also enter appropriate comments and any additional instructions required by the compiler.

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

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: