Mr a p Singh is a software engineer he pays income tax as per the given tableupto 100000 no tax rupees, 100001 to 150000 10% the amount exceeding 100000 , 150001 to 250000 5000+20%of yhe the amount exceeding 150000 , above 250000 25000+30%of the amount exceeding 250000 . Write a program in java to compute the income tax to paid by him
Answers
Answered by
14
Explanation:
public class Q14
{
public static void main (int sal)
{
double t;
{
if(sal<=100000)
t=0;
else if(sal>100000 && sal<=150000)
t=10.0/100.0*(sal-100000);
else if(sal>150000 && sal<=250000)
t=5000+20.0/100.0*(sal-150000);
else
t=25000+30.0/100.0*(sal-250000);
}
System.out.println(“Income tax = “+t);
}
}
Similar questions