AUTHOR

Klint, you might want to take a look at this...

/*Write a program to compute income tax as follows:
First, display the following menu and ask the user to select his or her filing status:
1. Single
2. Married filing separately
3. Married filing jointly
4. Head of household
For Single status, apply a deduction of $2000, for #2 $1700, for #3, $2300 and Head of household $2700. Add to the deduction amount, $150 for each dependent up
to a maximum of 4 dependents if single, $125 for each dependent up to a maximum of 4 for Married filing separately, $175 for each dependent, up to a maximum of 5,
if married filing jointly, or head of household. Add also 15% of any uncovered (out-of-pocket) medical expenses for singles and married filing individually, and 20% for the other two.
Likewise add 20% of any college expenses to first and second and 25% for the other two, as well as 20% of charitable contributions for all four.

Then, get user's income and compute the taxable income by subtracting the deduction from his or her income. Anyone with a taxable income of less than $8,000 pays no taxes.
For the rest, the first $15,000 of the income has a tax rate of 10%, the next $25,000 gets taxed at 15%, the next $30,000 at 20%, the next $30,000 at 25% and anything above $100,000 at 30%.
So, for example, someone who had taxable income of $125,000, her first $15,000 gets taxed at 10% ($1,500), plus 15% of $25,000 ($3,750), plus 20% of $30,000 ($6,000), plus 25% of $30,000 ($7,500)
and the remaining $25,000 at 30% ($7,500) for a total tax amount of $26,250. For someone with income of $13,000, the tax is 10% of that or $1,300. For someone who made $7,999.99 it would be 0,
but for someone who made $8,000, it's $800. For someone who made $30,000, it would be 10% of $15,000 or $1,500 plus 15% of the remaining $15,000 or $2,250 making it $3,750, and so on.
Next, ask for the amount of taxes already paid and subtract from tax due. If the difference is positive, display the amount owed along with the address where the check should be sent to (Franchise Tax Board, Fresno, CA).
Otherwise, if the amount of tax is negative, display the amount of refund, and then ask and read the address where the tax refund should be sent to. If the difference is 0, tell the user he or she owes nothing and will be
getting no refunds.
*/
Fucking A.
I'll do it, for $200
Have you ever had anal sex?
What language?
FriendZone quote:
I'll do it, for $200
I got it done earlier today.
swoon quote:
What language?
C++
swoon quote:
What language?
shut up you don't know
gink quote:
I got it done earlier today.
Are you single?
Here Klint, I will paste it in sections...

#include <iostream>
#include <string>
using namespace std;
int main()

{

char dependents1;
string address1;
int income1, deductions, medical, college, charity, tax1, tax2, stat;
tax1 = 0;
tax2 = 0;

cout << "Please Enter Your Status: " << endl << endl << "1. Single" <<endl <<"2. Married Filing Seperately" << endl << "3. Married Filing Jointly" << endl << "4. Head of Household" <<endl <<"Select 1 - 4 from above: ";
cin >> stat;

cout << "Enter the number of dependents: " ;
cin >> dependents1;

cout << "Enter Your Income: " ;
cin >> income1;
if (stat == 1 )
{
deductions=income1*.55;

if (dependents1 > 4)
{
dependents1 = 4;
}
deductions = deductions + (dependents1*150) + 2000;
income1 = income1 - deductions;
if (income1 < 0)
{
income1=0;
}
if (income1 > 8000)
{
tax1=(income1-8000)*.1;

if (income1 > 15000)
{
tax1=(15000*.1)+((income1-15000)*.15);

if (income1 > 40000)
{
tax1=(15000*.1)+(40000*.15)+((income1-40000)*.2);

if (income1 > 70000)
{
tax1=(15000*.1)+(40000*.15)+(70000*.2)+((income1-70000)*.25);

if (income1 > 100000)
{
tax1=(15000*.1)+(40000*.15)+(70000*.2)+(100000*.25)+((income1-100000)*.3);
}
}
}
}
}
}

if (stat == 2 )
{
{
deductions=income1*.55;

if (dependents1 > 4)
{
dependents1 = 4;
}
deductions = deductions + (dependents1*125) +1700;
income1 = income1 - deductions;
if (income1 < 0)
{
income1=0;
}
if (income1 > 8000)
{
tax1=(income1-8000)*.1;

if (income1 > 15000)
{
tax1=(15000*.1)+((income1-15000)*.15);

if (income1 > 40000)
{
tax1=(15000*.1)+(40000*.15)+((income1-40000)*.2);

if (income1 > 70000)
{
tax1=(15000*.1)+(40000*.15)+(70000*.2)+((income1-70000)*.25);

if (income1 > 100000)
{
tax1=(15000*.1)+(40000*.15)+(70000*.2)+(100000*.25)+((income1-100000)*.3);
}
}
}
}
}
}
}

if (stat == 3 )

{
deductions=income1*.65;

if (dependents1 > 5)
{
dependents1 = 5;
}
deductions = deductions + (dependents1*175) + 2300;
income1 = income1 - deductions;
if (income1 < 0)
{
income1=0;
}
if (income1 > 8000)
{
tax1=(income1-8000)*.1;

if (income1 > 15000)
{
tax1=(15000*.1)+((income1-15000)*.15);

if (income1 > 40000)
{
tax1=(15000*.1)+(40000*.15)+((income1-40000)*.2);

if (income1 > 70000)
{
tax1=(15000*.1)+(40000*.15)+(70000*.2)+((income1-70000)*.25);

if (income1 > 100000)
{
tax1=(15000*.1)+(40000*.15)+(70000*.2)+(100000*.25)+((income1-100000)*.3);
}
}
}
}
}
}



if (stat == 4 )
{
deductions=income1*.65;

if (dependents1 > 5)
{
dependents1 = 5;
}
deductions = deductions + (dependents1*175) + 2700;
income1 = income1 - deductions;
if (income1 < 0)
{
income1=0;
}
if (income1 > 8000)
{
tax1=(income1-8000)*.1;

if (income1 > 15000)
{
tax1=(15000*.1)+((income1-15000)*.15);

if (income1 > 40000)
{
tax1=(15000*.1)+(40000*.15)+((income1-40000)*.2);

if (income1 > 70000)
{
tax1=(15000*.1)+(40000*.15)+(70000*.2)+((income1-70000)*.25);

if (income1 > 100000)
{
tax1=(15000*.1)+(40000*.15)+(70000*.2)+(100000*.25)+((income1-100000)*.3);
}
}
}
}
}

}
}
cout << "You owe " << tax1 << " dollars in taxes. How much have you prepaid?" <<endl;
cin >> tax2;

if (tax2 > tax1)
{
cout << "You are owed " << tax2 - tax1 << " dollars in taxes. Please enter your address to where the refund should be issued: \n" <<endl;
getline(cin,address1);
getline(cin,address1);

cout <<endl << "Thank you. A check will be mailed for the amount " << tax2 - tax1 << " dollars to " << address1 ;
}

if (tax2 == tax1)
{
cout << "You do not owe any taxes. Thank you.";
}

if (tax2 < tax1)
{
cout << "You owe " << tax1 - tax2 << " dollars in taxes. Please mail a check for this amount to Franchise Tax Board, Fresno, CA." ;
}

}

nihilist quote:
shut up you don't know

Yeah, I only been paid to program and teach others to in several languages. Stfu.
Smiley Smiley Smiley
Smiley
Now I have to go back and write notes so I remember wtf I've been learning with the help I have been getting. That's my problem, I learn coding, some sticks with me, a lot I instantly forget. Smiley

Quick reply

Sign in to post a message.
Smileys

Times shown in Eastern Time (ET).