Wednesday, 10 September 2014

Employee Efficiency Program in C Language With Example

Employee efficiency in C program. It is used to calculate the employee stuff and knowledge by its working time using conditional statement (if…else if). It will execute by checking the, if statement are else if statements and all the conditions will be false if they print else statement.


//Header files
#include<stdio.h>
#include<conio.h>
 
void main()
{
//Program variables
int hours;
 
clrscr();  //Function to clear the previous output
printf("enter the no. of working hours:\n");  //display function
scanf("%d", &hrs);getting input function
 
if(hours<2)  //conditional statement
{
printf("worker is outstanding, should be promotion & appraisals");
}
if ((hours >=2)&&( hours <3))
{
printf(" worker is highly efficient , should b given STAR rating");
}
else if((hours >=3)&&( hours <4))
{
printf(" worker needs to increase speed, should b given MERITIOUS rating");
}
else if((hours >=4)&&( hours <5))
{
printf(" worker needs training to improve speed , should b given ADEQUATE rating");
}
else if(hours >=5)
{
printf(" worker needs training to leave , should b given TRAILER rating");
}
else printf("entry unambiguous");
getch();
}

No comments:

Post a Comment

Note: only a member of this blog may post a comment.