Income Tax

Given the income of a person the tax is to calculate and display the payable tax according to the given chart.

  • Upto ₹25,000 tax will be 0%
  • From ₹25,001 to ₹50,000 tax will be 5%
  • From ₹50,001 to ₹1,00,000 tax will be 7.5%
  • From ₹1,00,001 to ₹5,00,000 tax will be 10%
  • From ₹5,00,001 to ₹10,00,000 tax will be 12.5%
  • Above ₹10,00,001 tax will be 15%
Java
import java.util.*;
public class IncomeTax
{
    public static void main(String args[])
    {
        double income=0.0,tax=0.0;
        Scanner sc=new Scanner(System.in);
        System.out.print("Income: ");
        income=sc.nextDouble();
        if(income<=25000)
        {
            tax=0;
        }
        else if(income>25000&&income<=50000)
        {
            tax=0.05*income;
        }
        else if(income>50000&&income<=100000)
        {
            tax=0.75*income;
        }
        else if(income>100000&&income<=500000)
        {
            tax=0.1*income;
        }
        else if(income>500000&&income<=1000000)
        {
            tax=0.125*income;
        }
        else if(income>1000000)
        {
            tax=0.15*income;
        }
        System.out.println("Payable Tax: Rs "+tax);
    }
}
Java