Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

computer programming question 4) Align brackets so that it is easy to match corr

ID: 668519 • Letter: C

Question

computer programming question


4) Align brackets so that it is easy to match corresponding brackets 5) Write readable programs and program in C only. Develop a program that will determine the gross pay and net pay (after taxes for each of several employees. The program should execute in a loop until the hours warked entered by the user is less employees. The program should execute in a loap than(zero) 0. Each employee pays a flat tax of 150.00 for the first 1000.00 dollars earned. Taxes are computed at 15% for all earnings over 1000.000 dollars if the number of dependents is 2 or less and 12.5% if the number of dependents are 3 or more. Enter # of yours worked(-1 to exit program): 20 Enter rate of pay: 10.00 Enter number of dependents : 2 Gross salary is : $9999.99 Over _Time Pay: $999.99 Taxes_Width held: $999.99 Your Salary after taxes is : $999.99

Explanation / Answer


#include<stdio.h>
int main()
{
int HW, RP, ND,GS,OT,OTP,TX,TAX,NS;
printf("ENTER HOURS WORKED");
scanf("%d",&bs);
printf("Enter Rate of pay")
scanf("%d",&RP);
printf("Enter no of dependents")
scanf("%d",&ND);
GS=HW*RP;
printf("%d/Gross Salary is $:,GS)
OT=HW-10;
OTP=OT*RP;
printf("%d/Over time pay $:,OTP)
if
{(ND<=2)
TX=15;
else
TX=12.5;
}
TAX=GS*TX;
printf("%d/Tax deducted $:,TAX)
NS=GS-TAX;
printf("%d/Salary after tax is $:,NS)
return 0;
}