help with salary calculator and loops
can someone please give me help with modifiying the following code, so that it can be used for 10 employees.
basically what it is is a salary calculator, the user inputs there hourly salary, and hours worked, and the it calculates their pay and any overtime (x1.5) over 35 hours.
but i need 10 employees to be able to input their data, and didnt want to just copy the code 10 tens, so thought there may have been a loop or something i could use
please help
here is the code:
----------------------------------------------------------------------
int main()
{
float hours=0.0,wage1=0.0,pay=0.0,overtime=0.0,overtimep ay=0.0,totalpay=0.0;
cout<<"please enter wage: ";
cin>>wage1;
cout<<"Please enter hours worked: ";
cin>>hours;
pay=wage1*35;
overtime=wage1*1.5;
overtimepay=(hours-35)*overtime;
totalpay=pay+overtimepay;
if(hours<=35)
{
cout<<"Your weekley pay is: "<<pay;
}
else
{
cout<<"Your weekley pay + overtime is: "<<totalpay;
}
cin.ignore();
cin.ignore();
return 0;
}