Simple Selection
if (hours <= 40)
pay = hours * wage;
else
pay = 40 * wage + (hours - 40) * wage * 1.5;