Create a c++ program which accepts an employee’s full name, hours worked, and pay grade, and displays the employee’s name, and salary. The following data should be stored in parallel arrays.
#include <iostream>
using namespace std;
int main(void)
{
string firstnamearr[10] = {" "," "," "," "," "," "," "," "," "," "};
string lastnamearr[10] = {" "," "," "," "," "," "," "," "," "," "};
int paygrade[10] = {};
int hoursworked[10] = {};
int salary[10] = {};
cout << "\n The Names,Paygrade,Hoursworked and Salary of employees:";
cout << "\n -------------------------------------------------------";
cout << "\n firstname\tlastname\tpaygrade\thoursworked\tsalary";
cout << "\n ----------------------------------------------------------";
for(int i = 0; i < 10; i++)
{
cout << "\n " << firstnamearr[i] <<"\t\t" << lastnamearr[i] << "\t\t" << paygrade[i]
<< "\t\t" << hoursworked[i] << "\t\t" << salary[i];
}
cout << "\n --------------------------------------------------"<< endl;
return 0;
}