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
chubhunter [2.5K]
3 years ago
9

Write Java program to allow the user to input the amount of deposit, yearly interest rate (percentage), and income tax(percentag

e). Then the program will calculate the amount of interest that the person earns in the year. See the example output below: The amount of deposit: 10000 Yearly interest rate: 7.5%

Computers and Technology
1 answer:
Vedmedyk [2.9K]3 years ago
3 0

Answer:

import java.util.Scanner;

public class num12 {

   public static void main(String[] args) {

       Scanner scr = new Scanner(System.in);

       System.out.println("Enter a Deposit Amount");

       double amt = scr.nextDouble();

       System.out.println("Income tax in percentage");

       double incomeTaxRate = scr.nextDouble()/100;

       System.out.println("Yearly interest rate:");

       double rate = scr.nextDouble();

       double intRate = rate/100;

       double interest = (amt*intRate)-(amt*incomeTaxRate);

       System.out.println("The Interest on "+amt+" at "+rate+"% after one year is "+interest);

   }

}

Explanation:

Find the sample output attached

Java's Scanner class is used to prompt and receive values for deposit amount, income tax rate and interest rate

The yearly interest is calculate by interest = (amt*intRate)-(amt*incomeTaxRate);

You might be interested in
How do you do this question?
svet-max [94.6K]

Answer:

int k=0;

for(int i=0;i<=13; i++)

{

   if (table[i].getKey().equals(key))

   {

             k=i;

   }

   else

  {

             continue;

  }

}

 V value= table[k].getValue();

return value;

}

   

Explanation:

Note table[i] is an entry, and we know the key as it is an argument input to the function. Hence, we find the entry position using the given key, and then find the corresponding value and return it. And this is what is required. There are 14 entries in this hashtable, as known from the question.

6 0
3 years ago
The scheme where you can find the greatest common divisor of two integers by repetitive application of the division algorithm is
gavmur [86]

Answer:

False

Explanation:

The scheme where you can find the greatest common divisor (GCD) of two integers by repetitive application of the division algorithm is known as Euclidean Algorithm.

The Euclidean Algorithm for calculating GCD of two numbers X and Y can be given as follows:

  • If X=0 then GCD(X, Y)=Y since the Greatest Common Divisor of 0 and Y is Y.
  • If Y=0 then GCD(X, Y)=X since the Greates Common Divisor of 0 and X is X.
  • Let R be the remainder of dividing X by Y assuming X > Y. (R = X % Y)
  • Find GCD( Y, R ) because GCD( X, Y ) = GCD(Y, R ).
  • Repeat the above steps again till R = 0.

4 0
3 years ago
What feature allows you to access previous copies of a document on OneDrive?
swat32
<span>C) Stored work

I hope this helps :)
</span>
4 0
3 years ago
Read 2 more answers
How long does the Splunk search job remain active
Degger [83]
When you run a new search job, the job is retained in the system for a period of time, called the job lifetime. f the job is not accessed within the specified lifetime, the job expires and is removed from the system. There are two lifetime settings, 10 minutes and 7 days. The lifetime starts from the moment the job is run.
8 0
3 years ago
What happens if the cursor is in the last cell in a table and you press Tab?
Mashutka [201]
I think it would move to the beginning of the next row
8 0
3 years ago
Other questions:
  • A ____________ is a set of commands which can be run by calling it by name.
    11·2 answers
  • How do you delete text from a slide
    14·2 answers
  • (I'LL GIVE BRAINLIST)
    10·2 answers
  • How do you get stickman worriers
    12·1 answer
  • What are the two types of digital water marking?
    5·1 answer
  • again assume that each of the resistors in the circuit shown above has a resistance value of 100k(question in the picture above)
    9·1 answer
  • Administrative activities, such as archiving project files, closing out contracts, documenting lessons learned, and receiving fo
    15·1 answer
  • Andy, a developer, is designing a new program. Which tool should Andy use to help him complete his task?
    13·1 answer
  • Which of the following is the best example of an installation issue?
    6·2 answers
  • Imma say something random...
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!