nput to a function fillEmployee(int eNum). Make sure, employee number, must be 4 digit unique number otherwise repeat the process till you get valid input. Now the company wants to
There are total 50 employees working in XYZ organization who have a policy of Bonus via lucky draw. They want to automate the process to select employees randomly for lucky draw.
Write code for a console application where you have to declare an integer array that store employee numbers. Employee number will be provided as input to a function fillEmployee(int eNum). Make sure, employee number, must be 4 digit unique number otherwise repeat the process till you get valid input.
Now the company wants to announce employee through a Lucky Draw. You are required to generate random 4 digit employee number and compare with existing employee numbers (using Random class of C#). Repeat the process till you match a valid employee number and then print “congratulation” message along with winner’s employee number.
Note: You are required to write code only for required functionality.
Step by step
Solved in 2 steps