What's new

Closed Pa help po pls using turbo c++ po

Status
Not open for further replies.

A k o s i A j i n

Honorary Poster
Problem number 1:
An automobile repair shop wants you to write a payroll program for its employees.The program must calculate each employees net salary that is the salary after taxes.Prompt the user for the employee's pay rate hours worked employee code (either 'A' for full time or 'B' for part time ).and location (either 'N' for NCR or 'P' for Province ).Allow the user to enter either uppercase or lowercase letters. The program should display the regular pay, the overtime pay, the gross pay, the tax and the net pay,


Calculate the gross pay as follows. If the employee worked 40 hours or less, the regular pay is the pay rate times the hours worked and overtime pay is zero.If the employee worked over 40 hours ,the regular pay is the pay rate times 40 and the overtime pay is 1.5 times the pay rate times the hours worked over 40.Calculate the tax as follows. If the employee code is 'A' and the location is 'N' the tax is 7% of the gross pay. If the employee code is 'A' and the location is not 'N' the tax is 4.5% of the gross pay . If the employee code is not 'A' the tax is zero. The net pay is the gross pay minus the tax.

After the program process the last employee, it should display the total number of employees it processed and the total gross pay , tax , and net pay.

Sample Screen Output:::

This program calculates the net pay for each employee. At each prompt , enter the requested data.

Enter the pay rate : 7.25
Enter the number of hours worked: 47
Enter the employee code (A or B): A
Enter the state location (N or P): N

Regular Pay: 290.00
Overtime Pay: 76.12
Tax: 25.63
Gross Pay: 366.12
---------------------------------
Net Pay: 340.50
Do you want to prcess another employee?(n/p):n

Enter the pay rate : 8.50
Enter the number of hours worked: 30
Enter the employee code (A or B): A
Enter the state location (N or P): P

Regular Pay: 255.00
Overtime Pay: 0.00
Tax: 11.47
Gross Pay: 255.00
---------------------------------
Net Pay: 243.53
Do you want to process another employee?(n/p): n
 
Status
Not open for further replies.
Back
Top