Write a program in c++  to calculate the net pay of an employee. Input the basic pay, pass basic pay to user defined function PayCalculate(), calculate net pay and return to main function. Calculate the net pay of an employee should be stored in a file along with its complete detail such as emp_no, emp_name, emp-designation and next time if user want to view it can easily view it. House Rent is 45% of basic pay. Medical Allowance is 5% of basic pay if pay is greater than Rs.4000, it is 7% of basic pay if basic pay is less than or equal to Rs.4000. Conveyance Allowance is Rs.200 of basic pay if pay is greater than Rs.4000, it is Rs.435 of basic pay if basic pay is less than or equal to Rs.4000. Net pay is calculated by adding house rent, medical allowance ,conveyance allowance and basic pay.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter8: I/o Streams And Data Files
Section: Chapter Questions
Problem 5PP: (Data processing) Write a C++ program that reads the file created in Exercise 4, permits the user to...
icon
Related questions
Question

Write a program in c++  to calculate the net pay of an employee. Input the basic pay, pass basic
pay to user defined function PayCalculate(), calculate net pay and return to main function.
Calculate the net pay of an employee should be stored in a file along with its complete
detail such as emp_no, emp_name, emp-designation and next time if user want to view it
can easily view it.
House Rent is 45% of basic pay.
Medical Allowance is 5% of basic pay if pay is greater than Rs.4000, it is 7% of basic pay if
basic pay is less than or equal to Rs.4000.
Conveyance Allowance is Rs.200 of basic pay if pay is greater than Rs.4000, it is Rs.435 of
basic pay if basic pay is less than or equal to Rs.4000.
Net pay is calculated by adding house rent, medical allowance ,conveyance allowance and
basic pay.

Expert Solution
steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Knowledge Booster
File Input and Output Operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr