Develop a pseudocode algorithm to compute gross pay. The user will input the wag
ID: 3851286 • Letter: D
Question
Develop a pseudocode algorithm to compute gross pay. The user will input the wage and how many hours a person has worked for the week. The company determines the gross pay of an individual as: pay the regular rate for all hours worked up to 40 and including 40 hours, 1.5 times the regular wage for all hours over 40 up to 54 hours, and double wage times for all hours over 54 hours. Do not calculate any taxes for the individual. Your algorithm should display the following information: The name of the worker. The amount of pay without overtime ____Called regular pay The amount of pay for time and a half ____Called time and half earnings The amount of pay at double time.____Called double time earnings The total amount of pay the individual has earned for this paycheck.Explanation / Answer
pseudocode algorithm to compute the gross pay.
Do While More Records
Get employeeName, hoursPerWeek, rate
If hoursPerWeek>40 & hoursPerWeek<54
netpay=40*payrate
Base=40
Overhours1=hoursPerWeek-40
Overhours2=0
OvertimePay1=Overhours1*payrate*1.5
OvertimePay2=0
Else if hoursPerWeek>54
netpay=40*payrate
Base=40
Overhours1=14
Overhours2=hoursPerWeek-54
OvertimePay1=Overhours1*payrate*1.5
OvertimePay2=Overhours2*payrate*2
Else
netpay=hours*payrate
Base=hoursPerWeek
OvertimePay1=0
OvertimePay2=0
Overhours1=0
Overhours2=0
Endif
grosspay=Netpay+OvertimePay1+OvertimePay2
Display employeeName, netpay, OvertimePay1, OvertimePay2, grosspay
End Do
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.