package incometax;
import java.util.*;
// Name of the file
public class IncomeTax
//Main Method
{
public static void main(String[] args)
{
Scanner console = new Scanner(System.in);
int salary;
System.out.println("This program calculates your Income tax ");
System.out.print("Please enter Your Salary: ");
salary = console.nextInt();
double tax;
tax = 0.0;
//The if statement that determines the users tax on their income
if (salary <= 50000)
tax = salary * .01;
if (salary > 50000 && salary < 75000)
tax = salary * .02;
if (salary >= 75000 && salary < 100000)
tax = salary * .03;
if (salary >= 100000 && salary < 250000)
tax = salary * .04;
if (salary >= 250000 && salary < 500000)
tax = salary * .05;
if (salary >= 500000)
tax = salary * .06;
System.out.println("Your Salary is $" + salary);
System.out.println("Your tax on your salary is $" + tax);
}
}