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

Write a program that can calculate the amount of federal tax a person owes for t

ID: 3919593 • Letter: W

Question

Write a program that can calculate the amount of federal tax a person owes for the upcoming year. After calculating the amount of tax owed, you should report to the user their filing status (single/joint), which tax rate they fell under, as well as the tax owed. Example: As a single filer you fell under 12% tax bracket and you owe $3500." Disclaimer: This example is simplified and is not intended to be an accurate representation of how to calculate your taxes. Your program should ask the user if they are a single filer, or if they will be filing jointly with their spouse. If they file single, ask the user to input their total income for the year. If they file jointly then have the user enter both their income as well as their spouse's income. (You can then add the 2 incomes together to obtain gross household income.) Your program should also check to see if the person is eligible for the Earned Income Credit (EIC). EIC eligibility is dependent upon both filing status as well as number of dependents. Therefore, ask the user to enter how many children (dependents) they 2. have. Assume that if the person is eligible then She EIC deducts 8% from the gross income, so that only 92% of the gross income is now taxable. (The EIC will reduce the amount of income which is taxable, but does not change the person's tax bracket. Ex: If the person made $40,000 (single) then they are in the 22% bracket. The EC makes their taxable income 40,000*0.92 $36,800. This new total is within the 12% bracket, but the person still owes 22% of the $36,800

Explanation / Answer

#include <iostream>

using namespace std;

int main()
{
char ch;
float income1,income2,income,final,tax;
int no;
cout<<"Single filet?(Y/N)";
cin>>ch;
  
if(ch=='Y'||ch=='y')
{
cout<<"Enter the total income for the year: ";
cin>>income;
cout<<"Enter the no of childern: ";
cin>>no;
final=income;
cout<<"As a single filer you fell under ";
if((no==0 && income<15270) || (no==1 && income<40320) || (no==2 && income<45802) || (no>2 && income<49194))
{
final=0.92*income;
}
if(income<9526)
{
tax=.1*final;
cout<<"10%";
}
else if(income<38701)
{
tax=952.50 +(final-9525)*.12;
cout<<"12%";
}
else if(income<82501)
{
tax=4453.50 +(final-38700)*.22;
cout<<"22%";
}
else if(income<157501)
{
tax=14089.5 +(final-82500)*.24;
cout<<"24%";
}
else if(income<200001)
{
tax=32089.5 +(final-157500)*.32;
cout<<"32%";
}
else if(income<500001)
{
tax=45689.5 +(final-200000)*.35;
cout<<"35%";
}
else
{
tax=150689.50 +(final-500000)*.37;
cout<<"37%";
}
cout<<" tax bracket and you owe "<<tax;
}
else
{
cout<<"Enter your income: ";
cin>>income1;
cout<<"Enter your spouse income:";
cin>>income2;
income=income1+income2;
cout<<"Enter the no of childern: ";
cin>>no;
final=income;
cout<<"As a joint filer you fell under ";
if((no==0 && income<20950) || (no==1 && income<46010) || (no==2 && income<51492) || (no>2 && income<54884))
{
final=0.92*income;
}
if(income<19051)
{
tax=.1*final;
cout<<"10%";
}
else if(income<77401)
{
tax=1905 +(final-19050)*.12;
cout<<"12%";
}
else if(income<165001)
{
tax=8907 +(final-77400)*.22;
cout<<"22%";
}
else if(income<315001)
{
tax=28179 +(final-165000)*.24;
cout<<"24%";
}
else if(income<400001)
{
tax=64179 +(final-315000)*.32;
cout<<"32%";
}
else if(income<600001)
{
tax=161379 +(final-400000)*.35;
cout<<"35%";
}
else
{
tax=161379 +(final-600000)*.37;
cout<<"37%";
}
cout<<" tax bracket and you owe "<<tax;
}

return 0;
}

P.S: You didnt specify the programming language so i did it in C++

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote