### Help with homework

Write a program to process weekly employee time cards for all employees of an organization. Each employee will have three data items: the employee's name, the hourly wage rate, and the number of hours worked during a given week. Each employee is to be paid time and a half for all hours worked over 40. A tax amount of 3.625 percent of gross salary will be deducted. The program output should show the employeeâ€™s name, gross pay,and net pay, and should also display the total net and gross amount and their averages.Use zzzzzz as a sentinel value for name

this what i have so far

 ``123456789101112131415161718192021222324252627282930313233343536373839404142434445`` ``````#include #include #include using namespace std; int main () { string name; float wage, grosspay, netpay; float totalnet, totalgross, average; int hours,overhours,overtimewage; string zzzzzz; cout << "\nTo stop enter zzzzzz"; while ( name!="zzzzzz") { cout << "\nPlease enter employee's last name:"; cin >> name; cout << "\nPlease enter hours per week:"; cin >> hours; cout << "\nPlease enter hourly wage rate:"; cin >> wage; if (hours<40) { grosspay= hours*wage; } if (hours>40) { overhours= hours-40; grosspay=(0.5*overhours)+overhours+40; } netpay=grosspay-(3.625/100)*grosspay; //netPay calculation cout << "\nEmployee:"<< name; cout << "\nGross Pay:"<< grosspay<< endl<
in the overtime calculation,there is logical mistake

it should be
 ``123`` ``````OT_pay=0.5*overhours*wage; reg_pay=(hours-overhour)*wage; grosspay=OT_pay+reg_pay;``````

your code didnt used the wage for calcualtions
When user enters hours worked =40, the program shows error. so please correct it
Topic archived. No new replies allowed.