Ask Question
27 October, 21:28

The original U. S. income tax of 1913 was quite simple. The tax was

O 1 percent on the first $50,000.

O 2 percent on the amount over $50,000 up to $75,000.

O 3 percent on the amount over $75,000 up to $100,000.

O 4 percent on the amount over $100,000 up to $250,000.

O 5 percent on the amount over $250,000 up to $500,000.

O 6 percent on the amount over $500,000.

There was no separate schedule for single or married taxpayers.

a. Write a program that computes the income tax according to this schedule.

+3
Answers (1)
  1. 27 October, 22:45
    0
    Scanner inputObject = new Scanner (System. in);

    System. out. print ("Enter your income to calculate the tax: ");

    double income = inputObject. nextDouble ();

    double tax = 0;

    if (income < = 50000) {

    tax = income * 0.01;

    }

    else if (income > 50000 && income < = 75000) {

    tax = income * 0.02;

    }

    else if (income > 75000 && income < = 100000) {

    tax = income * 0.03;

    }

    else if (income > 100000 && income < = 250000) {

    tax = income * 0.04;

    }

    else if (income > 250000 && income < = 500000) {

    tax = income * 0.05;

    }

    else if (income > = 500000) {

    tax = income * 0.06;

    }

    System. out. printf ("Your tax is: $%.2f", tax);

    Explanation:

    Here is the Java version of the solution. The user is asked to enter the income and the tax is printed accordingly.

    Scanner class is used to take input from user, and the value is stored in income variable. A variable named tax is initialized to store the value of the tax.

    Then, if structure is used to check the income value. This income value is checked to decide the amount of the tax will be paid. For example, if the income is $100000, the tax will be calculated as tax = 100000 * 0.03 which is equal to $3000.00. After calculating the tax value, it is printed out using System. out. printf ("Your tax is: $%.2f", tax);.

    Be aware that the values are double, printf is used to print the value. "%.2f" means print the two decimal values in the result.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “The original U. S. income tax of 1913 was quite simple. The tax was O 1 percent on the first $50,000. O 2 percent on the amount over ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers