Write a Java program that accepts the salary of an employee, then deducts the income tax from the salary on the following basis: 30% income tax if the salary is above or equal $15000. 20% income tax if the salary is between $7000 and $15000. 10% income tax if the salary is below or equal $7000. Your program then should output the salary, income tax and the net salary.
//IncomeTax.java
import java.util.Scanner;
public class IncomeTax {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
System.out.print("Enter salary: ");
double salary = scan.nextDouble();
double tax = 0;
if(salary>=15000){
tax = salary*30/100;
}
else if(salary>=7000){
tax = salary*20/100;
}
else{
tax = salary*10/100;
}
System.out.println("Salary: $"+salary);
System.out.println("Tax: $"+tax);
System.out.println("Net salary: $"+(salary-tax));
}
}



Write a Java program that accepts the salary of an employee, then deducts the income tax...