Ejemplo n.º 1
0
        public static void Main(string[] args)
        {
            WorkWithConsoleClass workWithConsoleClass = new WorkWithConsoleClass();

            int[] array = new int[50];

            WorkWithArrayClass.InputRandomArray(array);
            workWithConsoleClass.ArrayOutput(array);
            workWithConsoleClass.SumOutput(array.Sum());
        }
Ejemplo n.º 2
0
        public static void Main(string[] args)
        {
            WorkWithConsoleClass workWithConsoleClass = new WorkWithConsoleClass();

            int[] array = workWithConsoleClass.InputArray();

            WorkWithArrayClass workWithArrayClass = new WorkWithArrayClass();

            workWithArrayClass.SortingArray(array);
            workWithArrayClass.SearchingElementInformation(array);
        }
Ejemplo n.º 3
0
        public static void Main(string[] args)
        {
            WorkWithArrayClass   workWithArrayClass   = new WorkWithArrayClass();
            WorkWithConsoleClass workWithConsoleClass = new WorkWithConsoleClass();

            int[, ,] array = new int[7, 7, 3];

            workWithArrayClass.InputRandomArray(array, 7, 7, 3);
            workWithConsoleClass.ArrayOutput(array, false);

            workWithArrayClass.ChangeElements(array, 7, 7, 3);
            workWithConsoleClass.ArrayOutput(array, true);
        }
Ejemplo n.º 4
0
        public static void Main(string[] args)
        {
            WorkWithConsoleClass workWithConsoleClass = new WorkWithConsoleClass();
            WorkWithArrayClass   workWithArrayClass   = new WorkWithArrayClass();

            int[] array = new int[50];

            workWithArrayClass.InputRandomArray(array);
            workWithConsoleClass.ArrayOutput(array);
            workWithConsoleClass.positiveElementsListOutput("Search:", workWithArrayClass.SearchPositiveElements(array));
            workWithConsoleClass.positiveElementsListOutput("Delegat search:", workWithArrayClass.DelegatSearch(array));
            workWithConsoleClass.positiveElementsListOutput("Anon search:", workWithArrayClass.AnonSearch(array));
            workWithConsoleClass.positiveElementsListOutput("Lambda search:", workWithArrayClass.LambdaSearch(array));
            workWithConsoleClass.positiveElementsListOutput("LINQ search:", workWithArrayClass.LinqSearch(array));
        }
Ejemplo n.º 5
0
        public static void Main(string[] args)
        {
            WorkWithArrayClass   workWithArrayClass   = new WorkWithArrayClass();
            WorkWithConsoleClass workWithConsoleClass = new WorkWithConsoleClass();

            int[] array = new int[50];

            workWithArrayClass.InputRandomArray(array);
            workWithConsoleClass.ArrayOutput(array, false);

            workWithArrayClass.SortArray(array, 0, array.Length - 1);
            workWithConsoleClass.ArrayOutput(array, true);

            workWithConsoleClass.TakeMinAndMaxElements(workWithArrayClass.TakeFirstAndLastArrayElement(array));
        }