1.Write functions to read in and print an Employee struct 2.Write an additional
ID: 3650113 • Letter: 1
Question
1.Write functions to read in and print an Employee struct2.Write an additional function that passes in an array of Employees and returns the index to a found id.
the output should look like
Employee Name?: Mary Contrary
Employee Id?: 1222222
Employee Yearly Salary?: 32003.33
Employee Name?: Sue Morgan
Employee Id?: 2444444
Employee Yearly Salary?: 78087.88
Employee Name?: Tom Hinks
Employee Id?: 6777777
Employee Yearly Salary?: 89018.38
Employee Name?: Jack Sprat
Employee Id?: 8999999
Employee Yearly Salary?: 42018.09
Employee Name?: Scott Burns
Employee Id?: 3444444
Employee Yearly Salary?: 22002.89
The Employee info is: Mary Contrary, 1222222, $32003.33
The Employee info is: Sue Morgan, 2444444, $78087.88
The Employee info is: Tom Hinks, 6777777, $89018.38
The Employee info is: Jack Sprat, 8999999, $42018.09
The Employee info is: Scott Burns, 3444444, $22002.89
Explanation / Answer
//part 1 #include #include using namespace std; struct Employee{ string FirstName,LastName; int Id; double Salary; }; int main(){ string temp; Employee list[5]; for(int i=0;i>list[i].LastName; coutlist[i].Id; coutlist[i].Salary; } for(int j=0;jRelated 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.