using System; // milliardx.cs namespace DANILIN { class Program { static void Main(string[] args) { Random rand = new Random();int t=0; int h2=1234567890; int h1=0; int f=0; int a; int comp = rand.Next(h2); int human = 950000000); while (f<1) { Console.WriteLine(); Console.Write("{0} {1} {2}", t, comp, human); if(comp < human) { Console.Write(" MORE"); a=comp; comp=(comp+h2)/2; h1=a; } else if(comp > human) { Console.Write(" less"); a=comp; comp=(h1+comp)/2; h2=a;} else {Console.Write(" win by {0} steps", t);f=1;} t++; } Console.ReadKey();}}}