Search for question
Question

14.6 Homework 2 P3: Income tax form

Program Specifications Write a program to calculate U.S. income tax owed given wages, taxable interest, unemployment compensation,

status (single or married) and taxes withheld. Taxpayers are only allowed to use this short form if adjusted gross income (AGI) is less than

$120000. Dollar amounts are displayed as integers with no comma separators. For example, printf("Deduction: $%d\n",

deduction)

Note: this program is designed for incremental development. Complete each step and submit for grading before starting the next step. Only

a portion of tests pass after each step but confirm progress.

Step 1 (2 pts). Input wages, taxable interest, unemployment compensation, status (1-single and 2-married) and taxes withheld as

integers. Calculate and output AGI (wages + interest + unemployment). Output error message if AGI is above $120000 and the program

stops with no additional output. Submit for grading to confirm two tests pass.

Ex: If the input is:

Fig: 1