A company has the following ranges of salaries for N number of employees. The income tax for each range is shown below




import java.util.Scanner;

public class myclass

{

  static double findIncomeTax(int s) {

    double tax=0;

    if(s>=0&&s<=999)

      tax = 15.0/100.0*s;

    else if(s>=1000&&s<=3999)

      tax = 18.0/100.0*s;

    else if(s>=4000&&s<=6999)

      tax = 20.0/100.0*s;

    else

      tax =25.0/100.0*s;

    return tax;

  }

  public static void main(String [] args) {

    System.out.prinltn("ENTER THE SALARY");

    int s=new Scanner(System.in).nextInt();

    System.out.println("INCOME TAX = "+new myclass.findIncomeTax(s));

  }

Post a Comment

Please Select Embedded Mode To Show The Comment System.*

Previous Post Next Post

It looks like you're using an ad blocker. We rely on ads to keep our site free, please whitelist us!

Click here to continue

Please whitelist our site to continue enjoying our content.

Whitelist | Close