b. Write a well-commented C++ program that reads data from the input file employee.txt. Each input line consists of last name, first name, base salary, total sales, and number of years of service.
Store the output in the file employees_payCheck.txt. Format your output to have two decimal places.
A sample output written to the output file employees_payCheck.txt is as follows:
Name: Andrew Thomas
Base Amount: ............. $ 2787.87
Bonus: ................... $ 2097.72
Gross Salary: ............ $ 4885.60
Federal Tax: ............. $ 574.06
Provincial Tax: .......... $ 251.61
CPP: ..................... $ 85.50
EI: ...................... $ 41.53
RRSP: .................... $ 363.98
Health Insurance: ........ $ 67.00
Net Pay: ................. $ 3501.93
You have to submit the output file employees_payCheck.txt along with your code (.cpp file) for this question.
Display the results on screen. Format your output to have two decimal places.
A sample output is as follows:
Name Base Salary Bonus Gross Salary Net Pay
Andrew Thomas $ 4885.60 $ 2097.72 $ 4885.60 $ 3501.93
Omar Taha $ $ $ $
Alice Smith $ $ $ $
1 answer
Can you show us your pseudocode?