Write a program using the while loop and eof() function to read the input file inData.txt (inData.txtDownload inData.txt). The file contains the following data:



Don Smith Accounting
Auditor
4500 5 30
Joe Cross Finance
Analyst
5500 6 30
James McIntyre IT
Programmer
5500 7 30



Here the first line contains the First Name, Last Name, and Department. The second line contains Position Title. The Third line contains monthly salary, bonus percentage, and tax percentage. Similar data is subsequently repeated for multiple employees.

After reading the data, the program should create an output as shown below:

First Name: Don

Last Name: Smith

Department: Accounting

Title: Auditor

Monthly Salary: $4500.00

Bonus: 5%

Tax: 30%

Paycheck: $3307.50

First Name: Joe

Last Name: Cross

Department: Finance

---

---

---



Write the output in outData.txt file.

Respuesta :

Otras preguntas