Guest User

Untitled

a guest
Feb 21st, 2018
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.12 KB | None | 0 0
  1. 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.
  2.  
  3. 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.
  4.  
  5.  
  6. Table 1.Refund Amount
  7.  
  8.  
  9. If your filing status is: Then:
  10. Single or Married Filing Separately The amount of your check will be the lesser of:
  11. $300,
  12. 5% of your taxable income,
  13. or your income tax liability
  14. Head of Household The amount of your check will be the lesser of:
  15. $500,
  16. 5% of your taxable income,
  17. or your income tax liability
  18. Married Filing Jointly or Qualifying Widow(er) The amount of your check will be the lesser of:
  19. $600,
  20. 5% of your taxable income,
  21. or your income tax liability
  22.  
  23.  
  24. Table 2. Distribution Dates
  25.  
  26.  
  27. If the last two digits of your Social Security You should receive your refund the week of:
  28. Number are:
  29. 00 - 09 July 23
  30. 10 - 19 July 30
  31. 20 - 29 August 6
  32. 30 - 39 August 13
  33. 40 - 49 August 20
  34. 50 - 59 August 27
  35. 60 - 69 September 3
  36. 70 - 79 September 10
  37. 80 - 89 September 17
  38. 90 - 99 September 24
  39.  
  40. Input
  41.  
  42. 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.
  43.  
  44.  
  45. The filing status is a single digit,
  46.  
  47.  
  48. 1 Single
  49. 2 Married Filing Jointly
  50. 3 Married Filing Separately
  51. 4 Head of Household
  52. 5 Qualifying Widow(er)
  53.  
  54.  
  55. Taxable income and tax liability are whole integer dollars. Input is terminated by a Social Security Number consisting of all zeros.
  56.  
  57. Output
  58.  
  59. For each taxpayer, output a summary line reporting the following:
  60.  
  61. * Social Security Number (exactly as input)
  62. * two spaces
  63. * a dollar sign ($) and the check amount, left justified with no leading zeros as: dollars, a decimal point, and two digits of cents
  64.  
  65. Then, for each week for which checks are to be distributed, output a summary line reporting the following:
  66.  
  67. * number of checks to be distributed that week (no leading space)
  68. * two spaces
  69. * a dollar sign ($) and the week's total distributed amount, left justified with no leading zeros, as: dollars, a
  70. * decimal point and two digits of cents
  71. * one space
  72. * the week exactly as listed in Table 2
  73.  
  74.  
  75. List the weeks in the same order as Table 2.
  76.  
  77. Sample Input
  78.  
  79. 123-45-0001 1 40100 8200
  80. 890-12-3456 4 98910 24182
  81. 123-45-0002 4 6000 904
  82. 000-00-0000
  83.  
  84. Sample Output
  85.  
  86. 123-45-0001 $300.00
  87. 890-12-3456 $500.00
  88. 123-45-0002 $300.00
  89. 2 $600.00 July 23
  90. 1 $500.00 August 27
Add Comment
Please, Sign In to add comment