Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

*PLEASE READ FIRST* I need this progrm to run . All the help ive gotten has been

ID: 3535244 • Letter: #

Question

*PLEASE READ FIRST*

I need this progrm to run. All the help ive gotten has been great but Im still receiving build errors. Please check back to see if it ran or not. If it doesnt run 2 stars will be given and I will comment asking for more help. Thank you!


Write a program to complete the employeeType struct on page 576. Prompt the user to input a employee's
















#include


"stdafx.h"

#include

<iostream.h>

#include

<iostream>

#include <string>


using


namespace std;


struct


employee



{


char


first[30],mid[30],last[30],add[30],city[30],state[30],email[30];


int


id,zip,day,month,year,salary,dept_id,phone, date;



};


int


_tmain(int argc, _TCHAR* argv[])


{


employee mem;





float


sal;



cout<<


"enter employee first middle and last name";



cin>>mem.first>>mem.mid>>mem.last;


cout<<


"enter add city state of a employee";



cin>>mem.add>>mem.city>>mem.state;


cout<<


"enter email id of employee";



cin>>mem.email;


cout<<


"enter id zip code month day and year of joining salary dept_id and phone no";



cin>>mem.id>>mem.zip>>mem.month>>mem.day>>mem.year>>mem.salary>>mem.dept_id>>mem.phone;


cout<<


"detail of employee is ";



cout<<


" Name -"<<mem.first<<" "<<mem.mid<<" "<<mem.last;



cout<<


" emp id "<<mem.id;



cout<<


" address is "<<mem.add<<" "<<mem.city<<" "<<mem.state<<" "<<mem.zip;



cout<<


" date hired "<<mem.date<<"/"<<mem.month<<"/"<<mem.year;



cout<<


" phone "<<mem.phone;



cout<<


" email "<<mem.email;



cout<<


" dept id "<<mem.dept_id;



sal=mem.salary/12;


cout<<


" monthly salary is "<<sal;



cout<<


" yearly salary is "<<mem.salary;



}


cout<<


"detail of employee is ";



cout<<


" Name -"<<mem.first<<" "<<mem.mid<<" "<<mem.last;



cout<<


" emp id "<<mem.id;



cout<<


" address is "<<mem.add<<" "<<mem.city<<" "<<mem.state<<" "<<mem.zip;



cout<<


" date hired "<<mem.date<<"/"<<mem.month<<"/"<<mem.year;



cout<<


" phone "<<mem.phone;



cout<<


" email "<<mem.email;



cout<<


" dept id "<<mem.dept_id;



sal=mem.salary/12;


cout<<


" monthly salary is "<<sal;



cout<<


" yearly salary is "<<mem.salary;



}


return 0;



}



Explanation / Answer

the code seems correct in logic..

If you did copy paste this code from your program, you check for syntax errors..

I will list down what all the syntax errors I have observed. Correct them and try to run it again...

What you have returned is repeated twice...

include typedef before struct...