1 Static voidMain2 (string[] args)2 { 3 //Lottery Events4Console.WriteLine ("Please enter the number of people who will participate in this lottery:");5 intren=Convert.ToInt32 (Console.ReadLine ());6 7 //defines the array length according to the number of people8 string[] A =New string[Ren];9 Ten //cycle through the phone number One for(inti =0; i < a.length; i++) A { -Console.WriteLine ("Please enter section", (n+1)+"Personal mobile phone number:"); -A[i] =console.readline (); the } - //Prompt Input Complete -Console.WriteLine ("all the mobile numbers participating in the Sweepstakes have been entered, please press ENTER to start the lottery"); - Console.readkey (); + - //Initialize random number +Random Rand =NewRandom (); A at //Circular Scrolling mobile phone number - for(inti =0; I < -; i++) - { -Console.clear ();//Clear Screen - intn = rand. Next (ren);//Random number - inConsole.WriteLine ("The winning numbers are:"+a[n]); -System.Threading.Thread.Sleep ( -); to //print and hibernate for 100 milliseconds + } - //Cheat Code the //console.clear (); * //Console.WriteLine ("Winning number is: 13864391497"); $ Panax Notoginseng}
Analog mobile number Lottery