Static voidMain25 Mobile number Lottery (string[] args) { //mobile number lottery, made by yourselfConsole.WriteLine ("Please enter the number of mobile phone number"); intn =Convert.ToInt32 (Console.ReadLine ()); string[] SJ =New string[n]; for(intSjhgs =0; Sjhgs < n; sjhgs++) {Console.WriteLine ("Please enter your phone number"); //string sjh = Console.ReadLine (); //uselessSj[sjhgs] = Console.ReadLine ();//set up an array of mobile phone numbers to hold the input phone number } //Console.WriteLine (Sjhgs);//Output Phone number//for (int i = 0; i < n; i++)//{ //Console.WriteLine (Sj[i]); //} DateTime x = DateTime.Now;//the current timeDateTime xx = X.addseconds (Ten); while(DateTime.Now.ToString ("YYYYMMDDHHMMSS")! = XX. ToString ("YYYYMMDDHHMMSS"))//The loop condition is that the current time is not equal to 10 seconds after the current time{console.clear (); Random R=NewRandom ();//build a random number generator intGs= R.next (n);//randomly extract the mobile number from N Mobile number GSConsole.WriteLine (Sj[gs]);//Enter the phone number that you pumpedThread.Sleep ( +);//1 seconds to scroll once } //Teacher's EditionConsole.WriteLine ("Please enter the number of mobile phone number:"); intA =Convert.ToInt32 (Console.ReadLine ()); string[] SJH =New string[A]; for(inti =0; i < A; i++) {Console.WriteLine ("Please enter the {0} phone number:", i+1); Sj[i]=Console.ReadLine (); } Console.WriteLine ("*************************************"); //LotteryDateTime d =DateTime.Now; DateTime DT= D.addseconds (Ten); while(true) {console.clear (); Random R=NewRandom (); intb =R.next (a); Console.WriteLine (Sj[b]); Thread.Sleep ( -); if(DateTime.Now.ToString ("YYYYMMDDHHMMSS") = = dt. ToString ("YYYYMMDDHHMMSS")) { Break; } Else{}} console.clear ();//CheatingConsole.WriteLine ("15165339515");// }
Mobile number Lottery