private static void Main()
        {
            int[] arr = { 1, 20, 2, 10 };
            var   x   = 2;
            var   mx  = new MaxSum();
            var   y   = mx.MxSum1(arr, x);

            Console.WriteLine(y);
        }
Пример #2
0
        private static void Main()
        {
            int[] arr = { 8, 3, 1, 2 };
            var   mx  = new MaxSum();
            var   li  = arr.Select((t, i) => mx.MxSum1(arr, i)).ToList();

            var p = li.Max();

            Console.WriteLine(p);
        }