Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

For the 2016 Canadian tax year, our Federal tax brackets are: This means that, b

ID: 3788802 • Letter: F

Question

For the 2016 Canadian tax year, our Federal tax brackets are: This means that, before deductions, etc., the first $45, 282 of a Canadians taxable income will be taxed at a rate of 15% (up to a total of $45, 282 times 15.0% - $6.792.30), the next $45, 281 ($90, 563-$45, 282) will be taxed at 20.5% (up to a grand total of $6, 792.30 + $45, 281 times 20.5% = $16, 074.90), etc. For example, someone who earned $50,000 of taxable income in 2016 would pay federal taxes of $7, 759.49 ($45, 282 x 15.0% + ($50,000 - $45, 282) times 20.5%). Someone who earned $1M in 2017 would pay ($46, 316.88 + ($1,000,000 - $200,000) times 33.0%) - $310, 316.88. Define a C++ function to compute the total tax that would be paid on a given amount of taxable income.

Explanation / Answer

#include<iostream.h>
#include<conio.h>
#include<iomanip.h>
float calTax(float amt)
{
float paytax;
if(amt>=0 && amt<=45281)
{
paytax= (amt*15.0)/100;
return paytax;
}
else if(amt>=45282 && amt<=90562)
{
amt=amt-45282;
paytax=6792.30+(amt*20.5)/100;
return paytax;
}
else if(amt>=90563 && amt<=140387)
{
amt=amt-90563;
paytax=16074.90+(amt*26.0)/100;
return paytax;
}
else if(amt>=140388 && amt<=200000)
{
amt=amt-140388;
paytax=29029.40+(amt*29.0)/100;
return paytax;
}
else
{
amt=amt-200001;
paytax=46316.88+(amt*33.0)/100;
return paytax;
}

}
void main()
{
clrscr();
float amount;

cout<<"Please Enter the amount to calculate Payable tax ";
cin>>amount;
float taxToPaid= calTax(amount);
cout<<" Payable Tax is ="<<setprecision(3)<<"$"<<taxToPaid;
getch();
}

/*this program calculate the tax according given tax slave in pic.*/

/*I have created a function name taxCal() which calculate tax and return it to main()