Question: Programming language is C++ 7-1 Code #include using namespace std; float round(float num) { float value=(int)(num*100+.5); return (float)value/100; } int main() { cout>pay_rate; cout>hours; cout>emp_code;

Programming language is C++Programming language is C++ 7-1 Code #include using namespace std; float round(float

7-1 Code

#include using namespace std; float round(float num) { float value=(int)(num*100+.5); return (float)value/100; } int main() { cout>pay_rate; cout>hours; cout>emp_code; cout>state_code; regular_pay=40*pay_rate; if(hours-40>0) overtime_pay=(hours-40)*(pay_rate +pay_rate*0.5); else overtime_pay=0; float tax=0.0; if(emp_code=='A'&&state_code=='Y') tax=(regular_pay+overtime_pay)*7/100; else if(emp_code=='A'&&state_code=='J') tax=(regular_pay+overtime_pay)*4.5/100; cout

num) { float value=(int)(num*100+.5); return (float)value/100; } int main() { cout>pay_rate; cout>hours;

PA 8-1 (25 points) Extend the pay program from Module 7 (PA 7-1) with while or do-while loop that asks the user if they want to continue. Allow both upper and lower case responses. When the processing of employees concludes, show the Total Number of Employees Processed, Total Gross Pay, Total Tax, and Total Net Pay (gross pay - taxes). Process at least 3 employees DACodeBlocks-EPCodeBlock is program calculates the net pay for each emp loyee. At each prompt, enter the requested data Enter the pay rate: 6.45 Enter the number of hours worked: 42 Enter the employee code CA or B): a Enter the state code (Y or J):Y Regular Pay: 258.00 Overtime Pay: 19.35 Gross Pay: 277.35 19.41 ax: Net Pay: 257.94 Do you want to process another employee? (y): Y Enter the pay rate: 12.45 Enter the number of hours worked: 40 Enter the employee code (A or B):B Enter the state code (Y or 3): j Regular Pay: 498.00 Overtime Pay: Gross Pay: 0.00 498.00 0.00 ax: Net Pay: Do you want to process another employee?(y): y 498.00 Enter the pay rate: 15.60 Enter the number of hours worked: 32 Enter the employee code (A or B): A Enter the state code (Y or J): Regular Pay: 499.20 Overtime Pay: Gross Pay: 0.00 499.20 22.46 ax Net Pay: Do you want to process another employee? (y): n 476.74 Total number of employees processed 3 Total gross pay: 1274.55 Total tax: Total net pay: 1232.67 41.88

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!