Thread: error message

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Sep 2009
    Posts
    18

    error message

    I keep getting a syntax error message right before the statetax in the while loop. But there isn't anything there
    Code:
    int main(void)
    
    {
            double salary = 0,sumtax = 0;
            double fedtax = 0.17;
            double statetax = 0.03;
    
       while (scanf("%lf",&salary) ==1)
            {
             fedtax = salary * fedtax
             statetax = salary * statetax
             sumtax = (salary - fedtax - statetax)
    
            printf("Value of Salary %lf", sumtax);
            }
    return 0;
    }
    Last edited by ke121885; 10-18-2009 at 03:46 PM. Reason: updated code

Popular pages Recent additions subscribe to a feed