The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Apr 2017 |
| Last Sign in: | 103 Weeks Ago, 3 Days Ago |
| Questions Answered: | 4870 |
| Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
The IRS 1040 EZ form is for people with no itemized deductions filing as single or married couple.The deduction is calculated based on these rules:If someone can claim you as depend on their return, then the deduction is 3900 for single and 6550 for married; otherwise the deduction is 6550 for single and 11800 for married.The taxable income is computed by the formula: taxable income = total income – deduction.The tax is calculated based on the filing status and taxable income.The tax rate schedules for single filing status are:
Create the form as below and use the button’s click event to compute the tax.  The textbox for deduction, taxable income and tax should be read-only.  Test your program with these inputs:
(1)   Single, total income 75000 and is a dependent of some people.  The tax should be 17563.
(2)   Married, total income 95000 and is not a dependent.  The tax should be 18499.
Â
My code won't execute the program
double incometotal, deduction, incometaxable, tax;
incometotal = double.Parse(textBox3.Text);
incometaxable = incometotal-deduction; Â THIS LINE IS WRONG
if (checkBox1.Checked)
{
if (radioButton1.Checked) deduction = 3900;
else deduction = 6500;
}
{
if (checkBox1.Checked)
{
if (radioButton2.Checked) deduction = 6550;
else deduction = 11800;
}
{
if (radioButton1.Checked)
{
if (incometaxable else if (incometaxable >= 22100 && incometotal tax = (.28 * incometaxable + 3315) / 21100;
else if (incometaxable >= 53500 && incometotal tax = (.31 * incometaxable + 12107) / 53500;
else if (incometaxable >= 115000 && incometotal tax = (.36 * incometaxable + 31172) / 115000;
else
tax = (.396 * incometaxable + 79772) / 250000;
}
{
if (radioButton2.Checked)
{
if (incometaxable else if (incometaxable >= 36900 && incometotal tax = (.28 * incometaxable + 5535) / 36900;
else if (incometaxable >= 89150 && incometotal tax = (.31 * incometaxable + 20165) / 89150;
else if (incometaxable >= 140000 && incometotal tax = (.36 * incometaxable + 35928.5) / 140000;
else
tax = (.396 * incometaxable + 75528.5) / 250000;
textBox4.Text = deduction.ToString();
textBox5.Text = tax.ToString();
}
}
}
}
}
Â
I wanna know what I did wrong
-----------