Using System; public class Test { public static void Main() { double x,y; Console.WriteLine("Введите x"); x = Convert.ToDouble(Console.ReadLine()); Console.WriteLine("Введите y"); y = Convert.ToDouble(Console.ReadLine()); if (x > y) { var min = y; y = (y + x) / 2; x = 2 * (min * x); } else if (y > x) { var min = x; x = (y + x) / 2; y = 2 * (y * min); } Console.WriteLine("x = {0}", x); Console.WriteLine("y = {0}", y); Console.ReadKey(); } }