using System.Diagnostics;
public static void Main()
Random random = new Random();
Console.Writeline("please type the random number as fast as possible press any key to start");
char[] ch = "0123456789".ToCharArray() ;
for (int j = 0; j < 10; j++)
string random_number_string = "";
for (int i = 0;random_number_string.Length!=8; i++)
int x = random.Next(0, ch.Length);
random_number_string += ch.GetValue(x).ToString();
Console.WriteLine(random_number_string);
a = Convert.ToInt32(console.read());
string key = Console.ReadKey().ToString();
if(key == random_number_string)
Console.WriteLine("you win");
Console.WriteLine("but for how long");
Console.WriteLine("restarting...");
System.Threading.Thread.Sleep(3000);
Console.WriteLine("you failed, say bye bye to your unsaved work")
System.Threading.Thread.Sleep(3000);
string filename = "", arguments = "", value = "";
string oparation = Console.ReadLine();
oparation = oparation.ToUpper();
value = oparation.Trim();
filename = "shutdown.exe";
ProcessStartInfo startinfo = new ProcessStartInfo(filename, arguments);
Process.Start(startinfo);