Error

Error
Last edited on

No idea what it means by using a for loop and a while loop, but here's some partial code to get you started. Is there a list of employees you're dealing with? That's the only thing I can think of that would require using a loop, much less two of them...
Total pay would be the hours times the hourly rate when the amount worked is under 40 hours.

1
2
3
4
5
6
7
8
9
10
11
double calcPay(double hours, double hourly_rate)
{
   double gross_pay;
    if (hours > 40.0)
    {
        //calculate and assign gross_pay, multiplying hours by 1.5
    }
    else calculate pay normally

    return gross
}

Normally, you should be able to start with something. Even if that's just an int main function + one or two lines of code.
Last edited on
Topic archived. No new replies allowed.