Answer:
Here is the code.
Step-by-step explanation:
#include<stdio.h>
int main()
{
int i, time_worked, over_time, overtime_pay = 0;
for (i = 1; i <= 10; i++)
{
printf("\\Enter the time employee worked in hr ");
scanf("%d", &time_worked);
if (time_worked>40)
{
over_time = time_worked - 40;
overtime_pay = overtime_pay + (12 * over_time);
}
}
printf("\\Total Overtime Pay Of 10 Employees Is %d", overtime_pay);
return 0;
}
Output :
Enter the time employee worked in hr 42
Enter the time employee worked in hr 45
Enter the time employee worked in hr 42
Enter the time employee worked in hr 41
Enter the time employee worked in hr 50
Enter the time employee worked in hr 51
Enter the time employee worked in hr 52
Enter the time employee worked in hr 53
Enter the time employee worked in hr 54
Enter the time employee worked in hr 55
Total Overtime Pay Of 10 Employees Is 1020.