Program Task;
Const m = 8; n = 5;
Var A: Array [1..n] of Integer;
B: Array [1..m, 1..n] of Integer;
i, j, min: Integer;
product: LongInt;
Begin
Randomize;
For i := 1 To m Do
For j := 1 To n Do
B[i, j] := Random(20 + 1) - 10;
WriteLn('Матрица B:');
For i := 1 To m Do
Begin
For j := 1 To n Do
Write(B[i, j], ' ');
WriteLn;
End;
For i := 1 To n Do
For j := 1 To m Do
A[i] := A[i] + B[j, i];
WriteLn('Массив A:');
For i := 1 To n Do
Write(A[i], ' ');
WriteLn;
min := 1;
product := 1;
For i := 1 To n Do
Begin
product := product * A[i];
If A[i] < A[min] Then
min := i;
End;
WriteLn('Минимальный элемент: ', A[min]);
WriteLn('Его расположение: ', min);
WriteLn('Произведение всех элементов: ', product);
ReadLn;
End.