+500
 



C# program to find Worker efficiency using if_else statement 

Program statement:
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:
static void Main(string[] args)
        {
            double time;
            Console.WriteLine("Enter the Worker's Time to complete Task:");
            time = Convert.ToDouble(Console.ReadLine());
            if (time >= 2 && time <=3)
                Console.WriteLine("Good! Worked Efficiently");
            else if(time>3 && time<=4)
                Console.WriteLine("Improved Your working Speed");
            else if(time>4 && time<=5)
                Console.WriteLine("Required Tranning to improve Speed");
            else if(time>5)
                Console.WriteLine("Leave this company");
            else
                Console.WriteLine("No Result for this input");
            Console.ReadLine();
        }



Post a Comment

 
Top