(Solved) : Response Comment Sample Input Output Given Information Ve Tried Writing Pseudocode Switch Q44097554 . . .
*in response to comment: no sample input or output was given,this is all the information I have. I’ve tried writing thepseudocode for it but the switch statements confuse me.
Write the following program in C. Assume a random fixed numberfor both hourly and weekly (i.e. 8 dollars/hour, $500/week).
Many universities pay their teaching assistants (TA) orassociate instructors (AI) as weekly workers (who receive a fixedweekly salary), hourly workers (who receive a fixed hourly wage forup to the first 10 hours they work and “time-and-a-half”- i.e., 1.5times their hourly wage – for overtime hours worked), commissionworkers (who receive $250 plus 7.1 times their gross weekly workhours), or pieceworkers (who receive a fixed amount of money foreach of the items they produce – each pieceworker in the universityworks on only one type of item). Some TAs may be internationalstudents who are not authorized to work more than 20 hours perweek. Write a program to compute the weekly pay for each worker.You do not know the number of employees in advance. Each type ofworker has its own pay code: AIs have paycode ‘W’, hourly workershave code ‘H’, commission workers have code ‘C’ and pieceworkershave code ‘P’. Use a switch statement to compute each employee’spay based on that employee’s paycode. Within the switch, prompt theuser
(i.e., the payroll clerk) to enter the number of employees of eachpaycode (minimum of 2), and the appropriate facts your programneeds to calculate each employee’s pay based on that employee’spaycode. [Note: You can input values of type double using theconversion specifier %lf with scanf.]. The program should start bydisplaying a ‘Menu’ like option where you user can enter theappropriate paycode first along with the number of employees ofthat type. Only acceptable paycodes are ‘W’, ‘H’, ‘C’, and ‘P’.User may enter ‘Q’ to quit the program. Any other choice shoulddisplay the menu again. Also display the followingstatistics:
• Weekly salary paid to workers who are internationalstudents,
• Weekly salary paid to workers who are domestic students,
• Weekly salary paid to workers with different paycodes.
• Total weekly salary paid to all workers
Note 1: Loops can be written using ‘while’, ‘for’ and ‘do-while’statements. For this question, you can’t use same loop statementmore than once (For example: if you have to use double nested loop,you can’t use ‘for’ loop inside a ‘for’ loop. It has to be ‘for’loop inside a ‘while’ or vice versa or some othercombination)!
Note 2: Your program should be case insensitive. Uppercase andlowercase inputs will be considered correct!
Note 3: After displaying the salary amounts, show the menu againautomatically. Notice that there will be no other way to stop theprogram until user enters Q.
Expert Answer
Answer to *in response to comment: no sample input or output was given, this is all the information I have. I’ve tried writing the…
OR