(Using MS Visual Basic 2008)
Hi, I have been ask to create a program that allows the user to input the hours worked and the payrate for a number of employees (note: Hours work and the payrate can all be differ, there is no set payrate), the number of employees should be determined by the user (i.e Prompt the user how many employees he/she want to process). The program will then calculate the weekly wages the employee(s) has earned (showing each employees wages, and display the result (weekly wages).
After all the employees weekly wages have been processed, the program should display a table that shows the
total normal hours worked by all employees, total overtime hours worked by all employees, total wages paid to all employees. Plz Help any info i will b thankful for :) Here Is What I Have So Far:
#include <iostream>
#include <typeinfo>
using namespace std;
int main()
{
int hoursworked[], payrate[];
float employees=0.0, hourscompleted=0.0;
cout<<"Please Enter The Amount Of Numbers You Want To Process: ";
cin>>employees;
for(int i=0;i<employees;i++)
{
cout<<"Please Enter How Many Hours The Employee "<<(i+1)<<" Has Worked:";
cin>>hoursworked[i];
cout<<"Please Enter The Payrate Of Employee "<<(i+1)<<":";
cin>>payrate[i];
while(hoursworked[i]<0)//keep looping until a valid employee amount is entered
{
cout<<"Invalid Amount Of Employees Entered, Please Try Again";
cin>>hoursworked[i];
}
}
}