#include <iostream>
#include <iomanip>
using namespace std;
int main ()
{
const int numOfEmployees = 7;
int empId[numOfEmployees]= {5658845,4520125,7895122,8777541,8451277…
int hours[numOfEmployees];
double payRate[numOfEmployees];
double wages[numOfEmployees];
cout << "Enter the hours worked by 7 employees and their hourly pay rates.\n";
cout << endl;
for (int count = 0;count < numOfEmployees;count++)
{
cout << endl;
cout << "Hours worked by employee #"<<empId[count]<< ":";
cin >> hours[count];
while (hours < 0)
{
cout <<"Please enter a positive number: ";
cin >> hours[count];
}
cout << "Hourly pay rate for employee #"<<empId[count]<<":";
cin >> payRate[count];
while (payRate[count] < 6.00)
{
cout << "Please enter a pay rate higher than $6.00: ";
cin >> payRate[count];
}
}
PLEASE USE CODE TAGS (the <> formatting button) when posting code. http://v2.cplusplus.com/articles/jEywvCM9/
It makes it easier to read your code and it also makes it easier to respond to your post.