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
Can someone please give me Python test 3 it would help me tremendously
Ket [755]

Question 1:  To tell what will happen when an if-statement is false.

Question 2: The = should be ==

                    elseif should be elif

                    The else should have a :

Question 3: All algorithms can only do number calculations.  

Question 4: and

Question 5: To make a follow-up True/ False decision

Question 6: if (text1 > 15):

Question 7: if (text1 == 78):

Question 8: if (num1 != num2):

Question 9: >=

Question 10: 4

Question 11: 3

Question 18: a < b and a != b  

Question 19: !=

Sorry about 12 - 17 and 20 i can't seem to find those questions guessing you wanted edhesive. I dont have an account on it.

5 0
3 years ago
VOTE: STARWARS, STAR TREK, MARVEL, STRANGER THINGS. OR IT ?
Gennadij [26K]
I'd say stranger things or it lol
5 0
3 years ago
Read 2 more answers
IN C++ PLEASE!!! Read integers from input and store each integer into a vector until -1 is read. Do not store -1 into the vector
ololo11 [35]
#include
#include
using namespace std;

int main(){

int input[] = {-19, 34, -54, 65, -1};
std::vector voutput:
std::vector vinput (input, input + sizeof(input) / sizeof(int) );

for (std::vector::iterator it = vinput.begin(); it != vinput.end(); ++it)
if(*it > 0) voutput.insert(voutput.begin(), *it);
for(std::vector::iterator it = voutput.begin(); it < voutput.end(); ++it)
std::cout << *it << ‘\n’ ;

return 0;
}
6 0
3 years ago
HELPPPPPPPPP MEEEEE :):):):):)
Pepsi [2]
I believe it’s b. Link text
7 0
3 years ago
If you could make another device "smart" and have
konstantin123 [22]

Answer:

I would 100% make myself a SmartToaster (Trademark Pending)

Explanation:

A simple explanation would be <em>I like toast</em>

7 0
3 years ago
Other questions:
  • True or false An electronic form uses input fields in which the user can enter data from their own computer and then transmit t
    10·1 answer
  • A short-circuit evaluation is where each part of an expression is evaluated only as far as necessary to determine whether the en
    14·1 answer
  • What is grid computing? It is distributed computing where autonomous computers perform independent tasks. It is interconnected c
    12·1 answer
  • Which of the following could be omitted from a company's AUP? A.Permissible lunchtime online activities B.Employees' home email
    15·2 answers
  • How to use command prompt​
    14·1 answer
  • What type of program installs and gathers personal information, including password and account information, from a computer with
    9·1 answer
  • A Windows user right-clicks on his desktop. What is he planning to do?
    10·1 answer
  • When a person bullies someone using technology, it's called:
    9·2 answers
  • Consider a file/directory with the following info:
    14·1 answer
  • Suggest 4 new features for microsoft word/excel.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!