C Primer Plus 第七章第八題

8. Modify assumption a. in exercise 7 so that the program presents a menu of pay rates from which to choose. Use a switch to select the pay rate. The beginning of a run should look something like this:

Enter the number corresponding to the desires pay rate or action:
1) $8.75 /hr 2) $9.323/hr
3) $10.00/hr 4) $11.20/hr
5) quit

If choices 1 through 4 are selected, the program should request the hours worked. The program should recycle until 5 is entered. If something other than choices are and then recycle. Use #defined constants for the carious earning rates and tax rates.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.