Thursday 25 July 2013

Chapter 2 solutions Problem [F][h]

Question-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.
Solution-
Boring question.That's how it goes.

#include<stdio.h>
int main()
{
float time;
printf("Enter time taken to complete the task\n");
scanf("%f",&time);
if(time>=2 &&time<=3)
printf("you are highly efficient,keep it up\n"); 
if(time>=3 &&time<=4)
printf("You are advised to improve your speed\n"); 
if(time>=4 &&time<=5)
printf("you are need to attend training session\n"); 
if(time>5)
printf("you are supposed to leave the company\n"); 
return 0;
}

No comments:

Post a Comment