Write a C program in a company, worker efficiency is determined on the basis of the time required for a worker to complete a particular job. If the time taken by the worker is between 2 - 3 hours, then the worker is said to be highly efficient. If the time required by the worker is between 3 - 4 hours, then the worker is ordered to improve speed. If the time taken is between 4 - 5 hours, the worker is given training to improve his speed, and if the time taken by the worker is more than 5 hours, then the worker has to leave the company. If the time taken by the worker is input through the keyboard, find the efficiency of the worker.
#include<stdio.h>
#include<conio.h>
void main()
{
float hours;
clrscr();
printf("Enter the number of hours worker takes to finish the job:");
scanf("%f",&hours);
if(hours>=2&&hours<=3)
printf("\nWorker is highly efficient");
else
{
if(hours>=3&&hours<= 4)
printf("\nWorker is ordered to improve his efficiency");
else
{
if(hours>=4&&hours<=5)
printf("\nWorker should be given training to improve his efficiency");
else
printf("\nWorker should leave the company");
}
}
printf("\nPress any key to exit.");
getch();
}
OUTPUT:
Enter the number of hours worker takes to finish the job: 4
Worker is ordered to improve his efficiency
Press any key to exit.