Ask Question
22 January, 18:47

Write a Java program that calculates and prints the monthly pay check for an employee. The net pay is calculated after taking the following deductions:

Federal Income Tax: 15%

State Tax: 3.5%

Social Security Tax: 5.75%

Medicare/Medicaid Tax: 2.75%

Pension Plan: 5%

Health Insurance: $75.00

+3
Answers (1)
  1. 22 January, 20:59
    0
    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.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Write a Java program that calculates and prints the monthly pay check for an employee. The net pay is calculated after taking the following ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers