#include #include // Library for I/O commands #include using namespace std; //This is Lab # 5 A & B //CompE 46 //Objection of this lab is to use Structures in the program. struct EmployeeData // Structure statement { long ssn; // Social Security #. This is a member within the structure. int id; // School identification number }; struct EmployeeSalary//Another structure statement. { double annual_salary; double net_pay; EmployeeData emp_data; }; int main () { EmployeeSalary emp_sal; double netpay; cout << "Please enter your Social Security Number [Limit of 9 digits ONLY]" << endl; cin >> emp_sal.emp_data.ssn; //Structure member which goes from the 2nd structure to the 1st.User must type in a numerical value. cout << "Please enter your identification number [Limit of 9 digits ONLY]" << endl; cin >> emp_sal.emp_data.id; // User must type in a numerical value again. cout.setf(ios::fixed); cout.precision(2); //Precision set to 2 as stated in the instructions cout << "Please enter your annual salary" << endl; cin >> emp_sal.annual_salary; if (emp_sal.annual_salary < 100000)// If-Else statement if netpay is less than 100,000 netpay = emp_sal.annual_salary - emp_sal.annual_salary * .30 ; else (emp_sal.annual_salary >= 100000);//If-Else statement if netpay is higher than 100,000 netpay = emp_sal.annual_salary - emp_sal.annual_salary * .40 ; //Next lines will output everything the user has inputted in addition to the netpay; cout << "Your Social Security Number is " << emp_sal.emp_data.ssn << endl; cout << "Your Identification number is " << emp_sal.emp_data.id << endl; cout << "With your annual salary being $ " << emp_sal.annual_salary << endl; cout << "Minus tax your salary would be $ " << netpay << endl; return 0; } //End of Program 10:28am 10.05.04