# why this code is not working guys!

• ``````#include<stdio.h>
int main()
{
int grossPay,tax1,tax2,tax3,extraHour,workingHour=40,TworkingHour,pay1,pay2,income1,totalTax,netPay,grossPay;
printf("Enter the hours you have worked today");
scanf(" %d",&TworkingHour);
extraHour=TworkingHour-workingHour;
pay1=workingHour*12;
pay2=extraHour*18;
grossPay=pay1+pay2;
if(grossPay<=300)
{
tax1=grossPay*0.15;
totalTax=tax1;
netPay=grossPay-totalTax;
printf("GROSS PAY\$%d/nTAX\$%d/nNET PAY\$%d",grossPay,tax1,netPay);
}
else if(grossPay>300 && grossPay<=450)
{
tax1=300*0.15;
income1=grossPay-300;
tax2=income1*0.20;
totalTax=tax1+tax2;
netPay=grossPay-totalTax;
printf("GROSS PAY\$%d/nTAXES\$%d,\$%d/nNET PAY\$%d",grossPay,tax1,tax2,netPay);
}
else if(grossPay>450)
{
tax1=300*0.15;
tax2=150*0.20;
income1=grossPay-450;
tax3=income1*0.25;
totalTax=tax1+tax2,tax3;
netPay=grossPay-totalTax;
printf("GROSS PAY\$%d/nTAXES\$%d,\$%d,\$%d/nNET PAY\$%d",grossPay,tax1,tax2,tax3,netPay);
}
else
{
printf("Invalid pay");
}

return 0;
}
``````

So `grossPay` is probably declared somewhere else already.