Answer:
The C program is commented in the explanation
Step-by-step explanation:
I am going to write a C program.
/*The number of hours worked is an input*/
void weeklyPay(int hours){
float Pay;
/*If he works 40 or less hours, he is paid $12 an hour*/
if(hours <= 40)
Pay = 12*hours;
/*If it is between 40 and 60, he gets 12 an hour plus time and a half over 40*/
if(hours >= 40 && hours <= 60)
Pay = 12*(hours + 1.5*(hours-40));
/*Else he gets paid what he would if he worked 60 hours*/
else
Pay = 12*(60 + 1.5*(60-40));
/*Output*/
printf("Weekly pay: %.2f\\", Pay);
}