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);