In this Code:
Code:
int main(void)
{
double salary = 0,sumtax = 0;
double fedtax = 0.17;
double statetax = 0.03;
printf("Enter your gross salary\n",salary);
while (scanf("%lf",&salary) ==1);
{
fedtax = salary * fedtax;
statetax = salary * statetax;
salary = (salary - fedtax - statetax);
sumtax = (fedtax + statetax);
}
printf("Value of Salary %lf\n", salary);
printf("Value of Taxes %lf\n", sumtax);
return 0;
}
I am getting a pause after the salary prompt and I can't actually get the answers until I hit ctrl D. Why does this keep happening?