1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Norma-Jean [14]
3 years ago
10

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

Computers and Technology
1 answer:
Svetradugi [14.3K]3 years ago
7 0

Answer:

       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.

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

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

Be aware that the values are <u>double,</u> <u>printf</u> is used to print the value. "<u>%.2f</u>" means print the<em> </em><u>two decimal values</u> in the result.

You might be interested in
What is star topology
Alexxx [7]
Every node connects to a central network device. like a hub, switch, or computer.
4 0
3 years ago
Read 2 more answers
What is all about programming interactions in the real world.
Lynna [10]

Answer:

Programming is everywhere in the modern world and meets you in the street, your workplace, and the local grocery store. You interact with bar-code scanners regularly, and you almost certainly use lots of code while working, whether you're using a word processor to write a letter or an email platform to send messages. Programs used in real-world environments should also be programmed in the real world, so we have developed a new programming paradigm, “Real-World Programming (RWP),” which enables users to make programs for handling real-world environments as well as data in computers

7 0
3 years ago
Nothin to see here just browsin
velikii [3]

Answer:

What????

What does that mean??????????????????????????????????

4 0
3 years ago
Of the choice below,access to with tab will start a power point presentation
kow [346]

the menu and the toolbars
4 0
3 years ago
What are the advantages of wired networks?
lesya [120]

Answer:

1   2    4

Explanation:

6 0
3 years ago
Other questions:
  • How do IT security workers help business
    5·1 answer
  • The place where one printed page ends and the next page begins.
    15·1 answer
  • Define the acronym WAECUP and its components
    15·1 answer
  • A Windows user contacted the help desk with a problem that requires the technician to connect to the remote computer using Remot
    12·1 answer
  • A program that interacts with another piece of software as it if were a human user is known as a(n) ________.
    5·1 answer
  • <img src="https://tex.z-dn.net/?f=%28a%20%2B%20b%29%20%20%7B2%7D" id="TexFormula1" title="(a + b) {2}" alt="(a + b) {2}" align
    15·1 answer
  • Please complete the following questions. It is important that you use complete sentences and present the questions and answers w
    6·1 answer
  • Ten output devices you know
    10·1 answer
  • The computer components that enables a computer to send and receive data, instructions or information from one or more computers
    13·1 answer
  • Write a report on the effectiveness of using thicker bags. Remember to include the effect on the environment and the economy in
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!