//Program that computes for the salary of the employee
#include <iostream>
using namespace std;
int main()
{
int EmployeeCode;
float WeeklySalary, HourlyWage, NumHoursWorked, Overtime;
cout<<"Enter Employee Code: ";
cin>>EmployeeCode;
if (EmployeeCode==1)
{
cout<<"Enter Weekly Salary: $ ";
cin>>WeeklySalary;
WeeklySalary = WeeklySalary;
cout<<"Weekly Salary is: $ "<<WeeklySalary;
}
else if (EmployeeCode==2)
{
cout<<"Enter Hourly Wage $: ";
cin>>HourlyWage;
cout<<"Enter Number of Hours Worked: ";
cin>>NumHoursWorked;
if (NumHoursWorked <= 40)
{
WeeklySalary = HourlyWage * NumHoursWorked;
cout<<"Weekly Salary is: $ "<<WeeklySalary<<endl;
}
else
{
Overtime = NumHoursWorked - 40;
WeeklySalary = (HourlyWage*40) + (Overtime*HourlyWage*1.5);
cout<<"Weekly Salary is: $ "<< WeeklySalary;
}
}
//else if
cout<<"\n\nPress any key and ENTER to EXIT";
char response;
cin>> response;
return 0;
}