Three employees in a company are up for a special payincrease. You are given a f
ID: 3613842 • Letter: T
Question
Three employees in a company are up for a special payincrease. You are given a file, say Ch3_Ex6Data.text, with thefollowing data: Miller Andrew 65789.87 5 Green Sheila 75892.56 6 Sethi Amit 74900.50 6.1 Each input line consist of an employees last name, first name,current salary, and percent pay increase. For example, in the firstinput line, the last name of the employee is Miller, the first nameis Andrew, the current salary is 65789.87 5, and pay increase is5%. Write a program that reads data from the specified file andstores the output in the file chp3_Ex6output.dat. For eachemployee, the data must be output in the following form: firstName lastName UpdatedSalary. Format the output ofdecimal numbers to two decimal places. Three employees in a company are up for a special payincrease. You are given a file, say Ch3_Ex6Data.text, with thefollowing data: Miller Andrew 65789.87 5 Green Sheila 75892.56 6 Sethi Amit 74900.50 6.1 Each input line consist of an employees last name, first name,current salary, and percent pay increase. For example, in the firstinput line, the last name of the employee is Miller, the first nameis Andrew, the current salary is 65789.87 5, and pay increase is5%. Write a program that reads data from the specified file andstores the output in the file chp3_Ex6output.dat. For eachemployee, the data must be output in the following form: firstName lastName UpdatedSalary. Format the output ofdecimal numbers to two decimal places.Explanation / Answer
please rate - thanks #include #include #include using namespace std; int main() {string last, first; double salary, percent,newsalary; ifstream in; ofstream out; in.open("Ch3_Ex6Data.txt"); //open file if(in.fail()) //is it ok? { coutfirst>>salary>>percent) {newsalary=salary+salary*(percent/100.); outRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.