A one-dimensional array Z is given [12]. Write a program to calculate A = B +
C + D, where D is the sum of those elements of a one-dimensional array that
are less than the last element, B is the difference between the maximum and
minimum elements of the array, C is the sum of those elements of the array
ordinal numbers. Organize the input of array elements from a file, output the
result to a file.
Instrustions: Create projects for data processing of a one-dimensional array in accordance with the variant of an individual task. The specified array is read from a text file in a separate function.