Answer:
import java.util.Scanner;
public class salary{
public static void main(String []args){
System.out.println("Enter the monthly pay: ");
Scanner scn = new Scanner(System.in);
double salary = scn.nextDouble();
double result = salary-(salary*0.15*0.035*0.0575*0.0275*0.05)-75;
System.out.println("The net salary is: "+result);
}
}
Explanation:
first import the Scanner class for taking the input from user.
then, create the main function and print the message for enter the salary from user. scn.nextDouble() store the value enter by user into the result.
after that, calculate the net salary by calculating the deduction amount and then subtract with salary.
finally, print the result on the screen.