3
Answers

payroll gui

Prime b

Prime b

12y
2.1k
1
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)