1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
|
//Cedric Shumate
//Payroll Wages Project
#include<iostream>
#include<iomanip>
using namespace std;
void getInfo();
void showInfo();
int main()
{
getInfo();
showInfo();
system("pause");
return 0;
}
void getInfo()
{
int count,
empId[7] = {565, 452, 789, 877, 845, 130, 758};
double payRate;
double hoursWorked;
double wagesEarned[7];
for(count = 0;count <= 6; count++)
{
cout << "Employee number : " << empId[count] << endl;
cout << "\nEnter employee's hour : ";
cin >> hoursWorked;
cout << "Enter employee's pay rate : ";
cin >> payRate;
wagesEarned[count] = hoursWorked * payRate;
cout << "\n";
}
}
void showInfo()
{
int count,
empId[7] = {565, 452, 789, 877, 845, 130, 758};
double wagesEarned[7];
for(count = 0;count <= 6;count++)
{
cout << "Employee number : " << empId[count] << endl;
cout << "Employee gross wager : " << fixed << setprecision(2) << wagesEarned[count] << endl;
cout << "\n";
}
}
|