Question: JavaScript program that prompts the user to enter an annual gross salary amount. It should then use the below criteria to calculate the tax and

  1. JavaScript program that prompts the user to enter an annual gross salary amount. It should then use the below criteria to calculate the tax and display the entered gross salary along with the calculated tax and the net salary (gross salary minus the tax) in an alert box.

Tax is 10% of the salary for salaries greater than zero and less than or equal to 40000

Tax is 15% of the salary for salaries greater than 40000 and less than or equal to 100000.

Tax is 25% of the salary for salaries greater than 100000.

For salaries less than or equal to 0 the program should display"Invalid Input" in the alert box

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!