Question

(2) Develop Computer Programs for Calculating the Tax Due that implements
taxation as intended by the U.S. Congress in the 2017 TAX CUTS AND JOBS ACT (Exhibit B2 METHOD A for Calculating Tax Due)

Having trouble getting this part down and wanted to see where you guys went with it. There is a second part to the question, but answering the first part here would be helpful! Any and all help appreciated! Really trying to get this down. This code is meant to be in C++.

Exhibit B2 - 2018 Tax Bracket Thresholds 2018 Tax Bracket Thresholds prescribed by the 2017 TAX CUTS ANDJOBS ACT Marginal tax

0 0
Add a comment Improve this question Transcribed image text
Answer #1

CODE:

#include<iostream>
#include<stdlib.h>
using namespace std;

int main()
{
    char status;
    float salary,tax;
    // get input from user
    cout << "Enter your marital status(S-Single,M-Married) : ";
    cin >> status;
    cout << "Enter your salary: ";
    cin >> salary;
    // if user is single
    if(tolower(status)=='s')
    {
        // calculate tax based on salary
        if(salary <= 9525)
            tax = 0.1 * salary;
        else if(salary <= 38700)
            tax = 0.12 * salary;
        else if(salary <= 82500)
            tax = 0.22 * salary;
        else if(salary <= 157500)
            tax = 0.24 * salary;
        else if(salary <= 200000)
            tax = 0.32 * salary;
        else if(salary <= 500000)
            tax = 0.35 * salary;
        else
            tax = 0.37 * salary;
    }
    // if user is married
    else if(tolower(status) == 'm')
    {
        // calculate tax
        if(salary <= 19050)
            tax = 0.1 * salary;
        else if(salary <= 77400)
            tax = 0.12 * salary;
        else if(salary <= 165000)
            tax = 0.22 * salary;
        else if(salary <= 315000)
            tax = 0.24 * salary;
        else if(salary <= 400000)
            tax = 0.32 * salary;
        else if(salary <= 600000)
            tax = 0.35 * salary;
        else
            tax = 0.37 * salary;
    }
    else
    {
        cout << "Marital status can only be single or married." << endl;
        exit(1);
    }
    // print tax
    cout << "Tax amount : " << tax << endl;
}

OUTPUT:

Add a comment
Know the answer?
Add Answer to:
(2) Develop Computer Programs for Calculating the Tax Due that implements taxation as intended by the...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Check my work Using Table 3.6, calculate the marginal and average tax rates for a single...

    Check my work Using Table 3.6, calculate the marginal and average tax rates for a single taxpayer with the following incomes: (Do not round intermediate calculations. Round your answers to 1 decimal place.) Marginal Tax Rate Average Tax Rate points a. b. c. d. $ $ $ $ Income 29,000 68,000 318,000 4,800.000 eBook Ask References TABLE 3.6 Personal tax rates, 2018 Tax Rate(%) Single Taxpayers $0-$9,525 $9,526-$38,700 $38,701-$82,500 $82,501-$157,500 $157,501-$200,000 $200,001-$500,000 $500,001 and above Taxable income ($) Married Taxpayers...

  • Question 4: Effective versus Marginal Tax Rate (25 points) Consider the following marginal tax table: DI...

    Question 4: Effective versus Marginal Tax Rate (25 points) Consider the following marginal tax table: DI Over $0 $ 9,526 $38,701 $82,501 $157,501 $200,001 $500,001 Single But not above $9,525 $38,700 $82,500 $157,500 $200,000 $500,000 Over SO $19,051 $77,401 $165,001 $315,001 $400,001 $600,001 Married But not above $19,050 $77,400 $165,000 $315,000 $400,000 $600,000 Tax Rate 10% 12% 22% 24% 32% 35% 37% The Excel sheet Income Tax lists two household incomes (one single and one married). Answer the following questions:...

  • Use Table 3.6. (Do not round intermediate calculations. Enter the average tax rate as a percent...

    Use Table 3.6. (Do not round intermediate calculations. Enter the average tax rate as a percent rounded to 1 decimal place.) a. What would be the marginal tax rate for a married couple with income of $89,200? b. What would be the average tax rate for a married couple with income of $89,200? c. What would be the marginal tax rate for an unmarried taxpayer with income of $89,200? d. What would be the average tax rate for an unmarried...

  • Please write in MATLAB code Write a program that can calculate the amount of federal tax...

    Please write in MATLAB code 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...

  • Write a Python program that computes the income tax for an individual. The program should ask...

    Write a Python program that computes the income tax for an individual. The program should ask the user to enter the total taxable income for the year. The program then uses the tax bracket (as shown below) to calculate the tax amount. This is based on a progressive income tax system which is how income tax is calculated in the U.S. As a result, this for example means that only income above $500,001 is taxed at 37%. Income of lower...

  • Calculating Taxable Income Taxable income Rate $0 — $9,525 10.0% $9,526 — $38,700 12.0% $38,701 —...

    Calculating Taxable Income Taxable income Rate $0 — $9,525 10.0% $9,526 — $38,700 12.0% $38,701 — $82,500 22.0% $82,501 — $157,500 24.0% $157,501 — $200,000 32.0% $200,001 — $500,000 35.0% $500,001 or more 37% Using the previous tax table, compute the tax liability for the individual in the scenario presented, rounding the liability to the nearest dollar. In addition, use the dropdown lists to identify the marginal tax rate and average tax rate for the individual in the scenario. Edison’s...

  • A company purchased 40 acres at 4,000 $/acre at a foreclosure auction as a potential quarry...

    A company purchased 40 acres at 4,000 $/acre at a foreclosure auction as a potential quarry site 11 months ago that could not get permitted. The company has an offer to sell the property today for $6,000 per acre. Using the table provided, how much would the company pay in capital gains taxes by selling the property today? 2018 Capital Gains Tax Rates: Breakdown Single Joint HoH Separate SINGLE FILERS Income Tax bracket Short-term capital gains rate Long-term capital gains...

  • Ing Your laxes Estimating taxable income, tax liability, and potential refund Arabella Cunningham is 24 years...

    Ing Your laxes Estimating taxable income, tax liability, and potential refund Arabella Cunningham is 24 years old and single, lives in an apartment, and has no dependents. Last year she earned $42,100 as a sales representative for Planning Associates; $3,368 of her wages was withheld for federal income taxes. In addition, she had interest income of $169. The standard deduction in 2018 was $12,000 for single. The appropriate tax rate schedule is shown below: EXHIBIT 3.3 Sample Tax Rate Schedules...

  • Arabella Cunningham is 24 years old and single, lives in an apartment, and has no dependents....

    Arabella Cunningham is 24 years old and single, lives in an apartment, and has no dependents. Last year she earned $38,500 as a sales representative for Planning Associates; $2,695 of her wages was withheld for federal income taxes. In addition, she had interest income of $135. The standard deduction in 2018 was $12,000 for single. The appropriate tax rate schedule is shown below: EXHIBIT 3.3 Sample Tax Rate Schedules Tax rates levied on personal income vary with the amount of...

  • AC309 Unit 5: Application Assignment – Investments Millie is a single taxpayer and her 2018 taxable...

    AC309 Unit 5: Application Assignment – Investments Millie is a single taxpayer and her 2018 taxable income is $181,205, calculated as follows: Description Amount Employee wages 133,000 Profit from business (Schedule C) 15,000 Ordinary income from partnership (Schedule E) 22,000 Interest income 4,000 Ordinary dividends (total dividends = 9,000) 2,000 Qualified dividends (total dividends = 9,000) 7,000 Short-term capital gain 8,200 Long-term capital gain 6,900 Total Income – Form 1040, Line 6 198,100 Deduction for ½ of self-employment tax (495)...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT