Computer Science, asked by megaMind5305, 6 months ago

Java program to take the monthly salary from the user and display income tax with the help of the following slab:
monthly salary income tax
8000 or less nil 8000-9000 20% of monthly salary 9000-10000 30% 10000 or above 40%

Answers

Answered by Anurag240417
5

Answer:

Class Abc

{

Void main(int sal,double tax)

{

If((amt>=0)&&(amt<=8000))

tax=nil;

else if((amt>=8000)&&(amt<=9000))

tax=amt*20/100;

else if((amt>=9000)&&(amt<=10000))

tax=amt*30/100;

else if(amt>=10000)

tax=amt*40/100;

System.out.println("Income tax="+tax);

}

}

Explanation:

Answered by sanjeevanaravindan
0

Answer:

Explanation:

Class Abc

{

Void main(int sal,double tax)

{

If((amt>=0)&&(amt<=8000))

tax=nil;

else if((amt>=8000)&&(amt<=9000))

tax=amt*20/100;

else if((amt>=9000)&&(amt<=10000))

tax=amt*30/100;

else if(amt>=10000)

tax=amt*40/100;

System.out.println("Income tax="+tax);

}

}

Similar questions