The payroll manager at Gerston Blankets wants a program that calculates and disp
ID: 3535728 • Letter: T
Question
The payroll manager at Gerston Blankets wants a program that calculates and displays the gross pay for each of the companys employees.It should also calculate and display the gross pay.The payroll manager will enter the number of hours the employee worked and his/her rate of pay. Employees working over 40 hours should recieve time and one half. Use a value returning function to determine the gross pay of an employee. Use a different value-returning fnction to accumulate the total gross pay. The program should display the total gross pay only after the manager has finished entering the data for all employees. Use a sentinel value to end the program. Please code in visual studio c++
Explanation / Answer
Dear,Here is the pseudocodeAlgorithm:main(): step1: do repeat Read hours Read payRate step2: call getGrossPay step3:print enter 'yes' to repeat read repeat step4: if repeat='yes' GOTO step1 step5: stopfunction getGrossPay(): step1: if hours>40 then grosspay :=(hours*pay_rate)+((40-hours)*pay_rate)*0.5; else grosspay :=hours*pay_rate; end if; print"Gross pay:"+grosspayreturn IPO chart:Hop
or
Dear user,b) Algorithm:Step 1: Intialize hours to zeroStep 2: While hours equal to -1Step 3: Prompt user to enter hours workedStep 4: Input the hoursStep 5: If hours not equal to -1 thenStep 6: Prompt user to enter hourly rate of the workerStep 7: Input the rate;Step 8: compute salary = hours * rate;Step 9: if hours greater than 40Step 10: compute salary = salary + (hours - 40)* rate * 0.5;Step 11: Display salaryc) Programg code in c++:#include<iostream.h>#include<stdio.h>#include&l
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.