Prime b

Prime b

  • NA
  • 810
  • 345.9k

payroll gui

Dec 31 2011 2:05 PM
This is the GUI version of payroll, but I get error, Syntax error, '(' expected and ) expected , i am looking and cant find it the problem

            double hPayRate, hWorked, grossPay, wthHoldTax, netPay;

            hPayRate= Convert.ToDouble(hPayRateTextBox.Text);
            hWorked = Convert.ToDouble(hWorkedTextBox.Text);

            grossPay = hPayRate * hWorked;

            if (grossPay <= 300.00)
            {
                wthHoldTax = grossPay * .10;
                netPay = grossPay - wthHoldTax;

                outPutLabel.Text = String.Format("Your net pay is {0}", netPay);
            }
            if else (grossPay >= 300.01)
            {
                wthHoldTax = grossPay * .12;
                netPay = grossPay - wthHoldTax;
                outPutLabel.Text = String.Format("Your net pay is {0}", netPay);
            }

Answers (3)