Question: Problem #2: [30 pts] Write a program that asks the user to enter his/her: Salary * Gender ('m' for male, 'f' for female) Age of
![Problem #2: [30 pts] Write a program that asks the user](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f91a6bc213a_25966f91a6b4fe46.jpg)
Problem #2: [30 pts] Write a program that asks the user to enter his/her: Salary * Gender ('m' for male, 'f' for female) Age of a person Then writes the corresponding tax and the net salary based on the below rules: Women pay 2% Men between 26 and 40 years pay 4% * Others men pay 1% taxes if their salary greater than 1500 $ and if not, tax is zero Sample run 1: Enter salary, gender (m or f) and age: 1200 m 30 The tax is 48.0 $ The net salary is 1152.0 $ Sample run 2: Enter salary, gender (m or f) and age: 1550 m 14 The tax is 15.5 $ The net salary is 1534.5 $ Sample run 3: Enter salary, gender (m or f) and age: 1200 m 41 The tax is 0.0 $ The net salary is 1200.0 $ Sample run 4: Enter salary, gender (m or f) and age: 1200 f 25 The tax is 24.0 $ The net salary is 1176.0 $ Sample run 5: Enter salary, gender (m or f) and age: 1200 G 25 Wrong input
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
