Beispiel #1
0
        private static void ShortArrayProcessing()
        {
            ArrayLength();
            short[] shortArr = new short[length];
            for (int i = 0; i < shortArr.Length; i++)
            {
                shortArr[i] = Convert.ToInt16(SingleRandom.Next(-1000, 1001));
            }

            ConsolePrintArray(shortArr);
            short shortSum = shortArr.ArraySum();

            Console.WriteLine($"Sum of elements in array: {shortSum.ToString()}");
        }