The pay of an hourly worker is calculated by multiplying the hours worked by the hourly rate—up to 40 hours;

LANGUAGE:  C++

CHALLENGE:

The pay of an hourly worker is calculated by multiplying the hours worked by the hourly rate—up to 40 hours;
any hours worked beyond 40 are paid at time-and-a-half (one and a half times the hourly rate).
Given the variables hours, rate, and pay have already been declared and assigned values, write a fragment of code (one or more statements) that assigns to pay the proper value, taking into account time-and-a-half.
(basic arithmetic, basic conditional)

SOLUTION:

The Bad News: The content you are trying to access is only available to members.

The Good News: You too can be a member, simply Click Here.

Already a member?

Posted in ,