Programming Assignment #1
COSC 146

What to do: write a complete perl program that will calculate the federal tax due for an individual.

Input: the program should prompt the user for the following pieces of information:
- total compensation for the year including wages, tips, bonuses, interest payments, etc.
- ask for the total number of deductions. This number must be at least 1 (for the user ) and could be higher.

Note: in accounting terminology, your total compensation is called "Gross Income" and your income after adjusting for dependents is called
your "Adjusted Gross Income". Perhaps variable names might reflect these terms ?

We make the following assumptions (I've made these numbers up):
- each dependent is a $3200 deduction from the Gross Income
- the federal tax due is based upon your Adjusted Gross Income. The tax due is based upon the following table:

Adjusted Gross Income (AGI) Pay this amount Plus this amount
<= 20,000 10% of AGI
between 20,001 and 40,000 $2,000 15% on all income over 20,000
between 40001 and 100,000 $5,000 22% on all income over 40,000
greater than or equal to 100,0001 $18,200 35% on all income over 100,000


For example, some with a total of 3 dependents with a gross income of $78,000 would pay as follows:

Gross Income = 78,000
Adjusted Gross Income = 78,000 - (3 x 3200) = 78,000 - 9,600 = 68,400
Tax Owed = 5,000 + .22 x (68,400 - 40,000)  =  5,000 + .22 x (28,400) = 5,000 + 6,248 = 11,248

Make sure your program is well documented, employs descriptive variable names and employs all of the documentation outlined in the syllabus.