Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- In June the IRS notified taxpayers that the United States Congress passed and President George "W." Bush signed into law the Economic Growth and Tax Relief Reconciliation Act of 2001. As part of the immediate relief, taxpayers would receive a check, the amount of which was based on Information submitted on their 2000 federal tax return. The notification described how the check amount was calculated, reproduced here in Table 1. Distribution of the checks was based on the schedule of Table 2.
- As a new employee at the Department of the Treasury, you have been tasked with developing the program to determine the value of each taxpayer's check and to determine how much is to be sent out each applicable week.
- Table 1.Refund Amount
- If your filing status is: Then:
- Single or Married Filing Separately The amount of your check will be the lesser of:
- $300,
- 5% of your taxable income,
- or your income tax liability
- Head of Household The amount of your check will be the lesser of:
- $500,
- 5% of your taxable income,
- or your income tax liability
- Married Filing Jointly or Qualifying Widow(er) The amount of your check will be the lesser of:
- $600,
- 5% of your taxable income,
- or your income tax liability
- Table 2. Distribution Dates
- If the last two digits of your Social Security You should receive your refund the week of:
- Number are:
- 00 - 09 July 23
- 10 - 19 July 30
- 20 - 29 August 6
- 30 - 39 August 13
- 40 - 49 August 20
- 50 - 59 August 27
- 60 - 69 September 3
- 70 - 79 September 10
- 80 - 89 September 17
- 90 - 99 September 24
- Input
- Input to your program is a series of lines, one line per taxpayer, consisting of Social Security Number, filing status, taxable income, and tax liability, each separated by single spaces. The format for the Social Security Number is ### - ## - #### , where # is a decimal digit, 0-9.
- The filing status is a single digit,
- 1 Single
- 2 Married Filing Jointly
- 3 Married Filing Separately
- 4 Head of Household
- 5 Qualifying Widow(er)
- Taxable income and tax liability are whole integer dollars. Input is terminated by a Social Security Number consisting of all zeros.
- Output
- For each taxpayer, output a summary line reporting the following:
- * Social Security Number (exactly as input)
- * two spaces
- * a dollar sign ($) and the check amount, left justified with no leading zeros as: dollars, a decimal point, and two digits of cents
- Then, for each week for which checks are to be distributed, output a summary line reporting the following:
- * number of checks to be distributed that week (no leading space)
- * two spaces
- * a dollar sign ($) and the week's total distributed amount, left justified with no leading zeros, as: dollars, a
- * decimal point and two digits of cents
- * one space
- * the week exactly as listed in Table 2
- List the weeks in the same order as Table 2.
- Sample Input
- 123-45-0001 1 40100 8200
- 890-12-3456 4 98910 24182
- 123-45-0002 4 6000 904
- 000-00-0000
- Sample Output
- 123-45-0001 $300.00
- 890-12-3456 $500.00
- 123-45-0002 $300.00
- 2 $600.00 July 23
- 1 $500.00 August 27
Add Comment
Please, Sign In to add comment