You are here:   HomeC Programming (Theory)Control Structures in CWrite a C program to display the series of numbers as given below
by Dinesh Thakur Category: Control Structures

 

 

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.


Subscribe To Free Daily Newsletter!

Get Free News Updates Delivered Directly To Your Inbox
About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.SC (Computer Science), MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular Computer Notes blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to contact us.



What's New and Popular





Popular Article