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: 3550260 • 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













Write a program to complete the employeeType struct on page 576. Prompt the user to input a employee's firstName, middleName, lastName, empID, address, city, state, zip, hiremonth, hireday, hireyear, phone, email, deptID and yearlysalary. Calculate the employees yearly salary to determine monthly salary.

Explanation / Answer

#include<iostream.h>

struct employee

{

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

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

};

void main()

{

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.date>>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;

}