Question

Write a program that takes the income of an employee and calculates the corresponding net income...

  1. Write a program that takes the income of an employee and calculates the corresponding net income and tax portion based on the following information: (in C++)

    • tax = 40%: income > =100,000 $

    • tax=30%: 80K<=income<100K

    • tax=20%: 60K<=income<80K

    • tax=10%: 40K<=income<60K

    • tax = 0%: income <40 K

Homework Answers

Answer #1

In case of any queries,please comment. I would be very happy to assist all your queries.Please give a Thumps up if you like the answer.


Program

#include <iostream>
using namespace std;
int main()
{
   float income,tax,net_income;
   cout<<"Enter income of employee : $";
   cin>>income;
   if(income>=100000)
       tax=.4*income;       //tax = 40%: income > =100,000 $
   else if (income>=80000 && income<100000)
       tax=.3*income;       //tax=30%: 80K<=income<100K
   else if (income>=60000 && income<80000)
       tax=.2*income;       //tax=20%: 60K<=income<80K
   else if (income>=40000 && income<60000)
       tax=.1*income;       //tax=10%: 40K<=income<60K
   else  
       tax=0;           //tax = 0%: income <40 K

   net_income=income-tax;
   cout<<"Income = $"<<income<<endl;
   cout<<"Tax = $"<<tax<<endl;
   cout<<"Net Income = $"<<net_income<<endl;
   return 0;
}

Output

Enter income of employee : $45600
Income = $45600
Tax = $4560
Net Income = $41040

Screenshot

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Write a Java program that calculates and prints the monthly pay for an employee. The net...
Write a Java program that calculates and prints the monthly pay for an employee. The net pay is calculated after taking the following deductions: Withholding Tax 10% SSS Contribution 2.50% Medicare 1.30% PensionPlan PHP 200.00
In Python... Write a program that calculates a student’s final grade in this course. The program...
In Python... Write a program that calculates a student’s final grade in this course. The program should: Display a message stating its goal Prompt the user to enter a student’s average grade for the weekly assignments, grade for mid-course project and grade for final project Calculate the final grade based on these percentages... Assignments = 60% Mid-course & Final Project = 40% (20% each) A A- B+ B B- C+ C C- D+ D D- E 100-94 93-89 88-85 84-82...
Has to be written in C#! Write a program that includes an Employee class that can...
Has to be written in C#! Write a program that includes an Employee class that can be used to calculate and print the take-home pay for a commissioned sales employee. Items to include as data members are employee number, first name, last name, and total sales. All employees receive 9% of the total sales of the month. Federal tax rate is 18%. Retirement contribution is 10%. Social Security tax rate is 6%. Use appropriate constants, design an object-oriented solution, and...
Write a Java program that reads employee information from the file “employee.txt” then the program will...
Write a Java program that reads employee information from the file “employee.txt” then the program will display his/her information on the screen. The file contains the Employee’s Name, age,join date, quit date, and salary. • For each year the employee is in the company,10 days of sick leave are allowed. So, if an employee is in the company for two years, 20 days of sick leave are allowed. • For each year the employee is in the company, one-month salary...
C++ Write a program that calculates and prints the total grade for n assignments as a...
C++ Write a program that calculates and prints the total grade for n assignments as a percentage. Prompt the user to enter the value of n, followed by the number of points received and number of points possible for each assignment . Calculate and print the total number of points received, total number of points possible, and the overall percentage: (total points received / total points possible) * 100. Output: Enter·number·of·assignments·to·input:3↵ Enter·number·of·points·received·for·assignment·1 :10↵ Enter·number·of·possible·points·for·assignment·1 :10↵ Enter·number·of·points·received·for·assignment·2 :7↵ Enter·number·of·possible·points·for·assignment·2 :12↵ Enter·number·of·points·received·for·assignment·3...
A Cable Company has hired you to write a C++ program that calculates the monthly bill...
A Cable Company has hired you to write a C++ program that calculates the monthly bill for their customers. It must meet the following specifications: The program must first greet the customer. The program must then ask for their name, the number of basic channels packages they’re subscribed to, then the number of premium channel packages they’re subscribed to. The bill is calculated as follows: There is a $75 base fee. The first 3 basic channels packages are free, after...
NO EXPLANATION REQUIRED. CHOOSE THE WRITE OPTION. QUE5. The amount an employee earns before any deductions...
NO EXPLANATION REQUIRED. CHOOSE THE WRITE OPTION. QUE5. The amount an employee earns before any deductions such as EI, CPP, and income tax withholdings is the A- Taxable income B- Gross pay C- Take home pay D- Deductible pay E- Net pay QUE6. A tax levied on the amount of a payroll or on the amount of an employee's gross pay is a(n) A- Excess profits tax B- Federal program C- Employer tax D- Employee tax E- Payroll tax QUE7....
Problem: A company wants a program that will calculate the weekly paycheck for an employee based...
Problem: A company wants a program that will calculate the weekly paycheck for an employee based on how many hours they worked. For this company, an employee earns $20 an hour for the first 40 hours that they work. The employee earns overtime, $30 an hour, for each hour they work above 40 hours. Example: If an employee works 60 hours in a week, they would earn $20/hr for the first 40 hours. Then they would earn $30/hr for the...
Python: Write a function called sum_odd that takes two parameters, then calculates and returns the sum...
Python: Write a function called sum_odd that takes two parameters, then calculates and returns the sum of the odd numbers between the two given integers. The sum should include the two given integers, if they are odd. You can assume the arguments will always be positive integers, and the first smaller than or equal to the second. To get full credit on this problem, you must define at least 1 function, use at least 1 loop, and use at least...
Draw flowchart AND write pseudo code User asks you to develop a program to calculate and...
Draw flowchart AND write pseudo code User asks you to develop a program to calculate and print weekly payroll. Calculations must take into account the following: User input ? a. Income tax rate is rate is 15% (.15*salary) b. Social Security tax is 7.65% (.0765*salary) c. Display salary, income tax, social security tax, and net pay net pay=salary-income tax – social security tax