Complete Figure 5-34 by writing the algorithm and corresponding C++ instructions. Employees with a pay code of

Question:

Complete Figure 5-34 by writing the algorithm and corresponding C++ instructions. Employees with a pay code of 1, 4, or 9 receive a 4.5% raise; all other employees receive a 3.5% raise. If necessary, create a new project named TryThis9 Project, and save it in the Cpp8\Chap05 folder. Enter the C++ instructions into a source file named TryThis9.cpp. Also enter appropriate comments and any additional instructions required by the compiler. Display the new pay in fixed-point notation with two decimal places. Test the program using 1 and 500 as the pay code and current pay, respectively. The new pay should be $522.50. Now test the program using the following three sets of input values: 4 and 450, 9 and 500, 2 and 625.

Figure 5-34

IPO chart information C++ instructions Input pay code current pay raise rate i (4.5%) raise rate 2 (3.5%) char code - ''; double current Pay - 0.0; const double RATE1 = 0.045; const double RATE2 - 0.035; Processing raise double raise = 0.0; Output new pay double newPay = 0.0;

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

Step by Step Answer:

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