14569 50 45 2375 18519 60 44 2760 All data should be recorded into the file payf
ID: 3615543 • Letter: 1
Question
14569 50 45 237518519 60 44 2760
All data should be recorded into the filepayfile.dat.Write then a program to read the file payfile.dat and displaysthen the content on the screen.
Find the following:
1.The employee who earns the highest salary. Give his number andwage. (DONE!)
2. Find the average wages of all employees.
3. Find the average payment per worked hour thatthe company pays.
4. Ask the company to enter its weekly income. Seethen if there is some deficit or benefit. Note that the company'sexpenses are salaries and indirect costs which represent 20% of thesalaries. empNum payRate
hours
wages
Explanation / Answer
please rate - thanks #include #include using namespace std; int main() {double hours,payRate,total=0,wage,week,exp,tothours=0; int empNum,n=0; ofstream out; out.open("payfile.dat"); coutempNum; while(empNum!=0) {coutpayRate; couthours; if(hoursRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.