Question: Hi expert, this is question programming in c++ hope you can do the question in detailed and correctly so that i can understand and learn

Hi expert, this is question programming in c++ hope you can do the question in detailed and correctly so that i can understand and learn something from you expert.i really need explanation to get better understanding thank you expert, will vote ya

Hi expert, this is question programming in c++ hope you can dothe question in detailed and correctly so that i can understand andlearn something from you expert.i really need explanation to get better understandingthank you expert, will vote ya (c) The following program calculates the

(c) The following program calculates the weekly salary for 3 type of workers namely manager, hourly worker and commission worker. The program however only calculates the salary for one worker only after the code for the worker has been entered 3/12 KIE1004 #include using namespace std; int main() ! int paycode, TotalHours pieces 1 double pay, HourlySalary, Piecewage, Weeklysalary. GrossWeeklySales) cout > paycode: while (paycode =4) cout > paycode: ) cout > WeeklySalary: cout > Hourlysalary: cout > Total Hours) if (Total Hours (40) pay - HourlySalary Total Hours: else (40.0 * Hourlysalary) + (HourlySalary + 1.5); pay - (Total Hours - 40) - cout > GrossWeeklySales; cout return 0; } Modify the codes so that the program will loop and requesting the code of the worker until 0 is entered to terminate the program. The program should also display the total salary of all workers when the program terminates. Below is the sample output after the modifications. Contoh keluaran/Sample output Enter paycode Enter 1 for Manager, 2 for Hourly Worker and 3 for Commission Worker. (O to end) : 1 Manager selected. Enter weekly salary: 800 The manager's pay is $ 800.00 Enter paycode Enter 1 for Manager, 2 for Hourly Worker and 3 for Commission Worker. (O to end): 5 Enter paycode Enter 1 for Manager, 2 for Hourly Worker and 3 for Commission Worker. (O to end) : 2 Hourly worker selected. Enter the hourly salary: 20 5/12 KIE 1004 Enter the total hours worked: 45 Worker's pay is $ 950.00 Enter paycode Enter 1 for Manager, 2 for Hourly Worker and 3 for Commission Worker. (O to end) : 0 Total salary for all workers is 1750.00 (6 markah 1 marks) ii. If the segments of the codes which has been underlined below are changed with two separate functions, write the appropriate function prototypes and function definitions for both functions. if (Total Hours

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!