Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

c++ using following code to start, thx #include using namespace std; //Function prototype double taxCalc(double inco, char filing); const int tax[7] ={10,12,22,24,32,35,37}; const int taxBracket[4][6]=

c++

using following code to start, thx

#include

using namespace std; //Function prototype double taxCalc(double inco, char filing);

const int tax[7] ={10,12,22,24,32,35,37}; const int taxBracket[4][6]= {{9700,39475,84200,160725,204100,510300}, {19400,78950,168400,321450,408200,612350}, {9700,39475,84200,160725,204100,306175}, {13850,52850,84200,160700,204100,510300}}; int main(void){

char filingStatus; double income; cout>filingStatus; cout>income; //Your code to determine the filing status and the taxBracket //Call taxCalc function to calculate the tax return 0; }

double taxCalc(double inco, char filing){ //Your code to calculate the tax goes here }

image text in transcribed

2. [50 pts] Federal Tax Calculator calculates the amount of federal tax depending on the income, filing status, and the tax brackets (standard/itemized deduction is zeroed to make the problem simple). There are four different filing status and seven tax brackets as given in the below table: Tax Single (S) Married Filing Married Filing Sep-Head of Household rate Jointly (M) arately (F) (H) 10% $0 to $9,700 $0 to $19,400 $0 to $9,700 $0 to $13,850 12% $9,701 to $39,475 $19,401 to $78,950 $9,701 to $39,475 $13,851 to $52,850 22% $39,476 to $84,200 $78,951 to $168,400 $39,475 to $84,200 $52,851 to $84,200 24% $84,201 to $160,725 $168,401 to $321,450 $84,201 to $160,725 $84,201 to $160,700 32% $160,726 to $204,100 $321,451 to $408,200 $160,726 to $204,100 $160,701 to $204,100 35% $204,101 to $510,300 $408,201 to $612,350 $204,101 to $306,175 $204,101 to $510,300 37% $510,301 or more $612,351 or more $306,176 or more $510,301 or more Your program should input the income and filing status (either S, M, For H) and cal- culate the tax. The tax is calculated as follows: 1. For example, for someone with Single status and an income of $10,000, tax = 9700*(10/100) + (10000-9700)*(12/100) = 970 + 36 = $1006 The tax slabs for Single (S) filing is given in Column 1 of the table. The slabs are $9,700, $39,475, $84,200, $160,725 and so on. In this case, the income of $10,000 is greater than the first tax slab of $9,700. Therefore, the tax rate (10%) of the entire slab ($9,700) is calculated. In next step, the first slab amount is deducted from the income and compared with the second slab. Since, $10,000 - $9,700 = $300 is less than $39,475, the tax is calculated as, the tax from the first slab (10% of $9,700) plus 12% (second slab tax) of $300 = $36(residual amount). So, the total tax is $970 + $36 = $1006 2. [50 pts] Federal Tax Calculator calculates the amount of federal tax depending on the income, filing status, and the tax brackets (standard/itemized deduction is zeroed to make the problem simple). There are four different filing status and seven tax brackets as given in the below table: Tax Single (S) Married Filing Married Filing Sep-Head of Household rate Jointly (M) arately (F) (H) 10% $0 to $9,700 $0 to $19,400 $0 to $9,700 $0 to $13,850 12% $9,701 to $39,475 $19,401 to $78,950 $9,701 to $39,475 $13,851 to $52,850 22% $39,476 to $84,200 $78,951 to $168,400 $39,475 to $84,200 $52,851 to $84,200 24% $84,201 to $160,725 $168,401 to $321,450 $84,201 to $160,725 $84,201 to $160,700 32% $160,726 to $204,100 $321,451 to $408,200 $160,726 to $204,100 $160,701 to $204,100 35% $204,101 to $510,300 $408,201 to $612,350 $204,101 to $306,175 $204,101 to $510,300 37% $510,301 or more $612,351 or more $306,176 or more $510,301 or more Your program should input the income and filing status (either S, M, For H) and cal- culate the tax. The tax is calculated as follows: 1. For example, for someone with Single status and an income of $10,000, tax = 9700*(10/100) + (10000-9700)*(12/100) = 970 + 36 = $1006 The tax slabs for Single (S) filing is given in Column 1 of the table. The slabs are $9,700, $39,475, $84,200, $160,725 and so on. In this case, the income of $10,000 is greater than the first tax slab of $9,700. Therefore, the tax rate (10%) of the entire slab ($9,700) is calculated. In next step, the first slab amount is deducted from the income and compared with the second slab. Since, $10,000 - $9,700 = $300 is less than $39,475, the tax is calculated as, the tax from the first slab (10% of $9,700) plus 12% (second slab tax) of $300 = $36(residual amount). So, the total tax is $970 + $36 = $1006

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Database Management Systems

Authors: Mark L. Gillenson

2nd Edition

0470624701, 978-0470624708

More Books

Students also viewed these Databases questions

Question

Organize and support your main points

Answered: 1 week ago

Question

Move smoothly from point to point

Answered: 1 week ago