Hey guys I need to combine the following into one if statement:
else if (hrs >= 40.01)
{
salary = hrs * payrt * 1.5;
cout << "\nYour gross pay for the week is " << setw(1) << ":"
<< setw(8) << salary << endl;
}
else if (hrs <= 59.99)
{
salary = hrs * payrt * 1.5;
cout << "\nYour gross pay for the week is " << setw(1) << ":"
<< setw(8) << salary << endl;
}
I tried: else if (hrs >= 40.01 || <= 59.99) but it didnt work. Thanx for your help.
N.B. this is just part of my program, I also found the hours worked over 60 hrs and hours worked under 40 hrs. This is only part that goes crazy once its ran, so I am trying to combine the two if statements.:cool: