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
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...
Q3) Write a function that takes two arrays and their size as inputs, and calculates their...
Q3) Write a function that takes two arrays and their size as inputs, and calculates their inner product (note that both arrays must have the same size so only one argument is needed to specify their size). The inner product of two arrays A and B with N elements is a scalar value c defined as follows: N−1 c=A·B= A(i)B(i)=A(0)B(0)+A(1)B(1)+···+A(N−1)B(N−1), i=0 where A(i) and B(i) are the ith elements of arrays A and B, respectively. For example, theinnerproductofA=(1,2)andB=(3,3)isc1 =9;andtheinnerproductofC= (2,5,4,−2,1)...
The Company’s first year of operations results in the following data: Pretax accounting income $ 200...
The Company’s first year of operations results in the following data: Pretax accounting income $ 200 Traffic fines included in pretax accounting income (not deductible for tax purposes) 10 Depreciation expense included in pretax accounting income 30 Depreciation for tax purposes 110 The tax rate is 20%. The Company should record A) Income taxes payable of $42. B) Income taxes payable of $16. C) Income taxes payable of $26. D) Tax benefit of $10 due to the traffic fine. Which...
Net Investment $100 Depreciation     40 Export     50 Import     30 Government expenditure 150 House...
Net Investment $100 Depreciation     40 Export     50 Import     30 Government expenditure 150 House hold consumption 400 Indirect business taxes     35 Income earned but not received     60 Income received but not earned     70 Personal income taxes     50 Employee compensation 460 Corporate profits     60 Rental income     20 Net interest     40 Proprietors income     55 USE THE TABLE ABOVE TO CALCULATE THE GDP 1. a. Using the income base method. b.Using the expenditure...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT