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;

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;

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; Algorithm:

Step by Step Solution

3.37 Rating (153 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

IPO chart information Input pay code current pay rate 1 45 rate 2 35 Proce... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related An Introduction Programming Questions!