Program Zadacha;
Const n = 10; m = 10; max = 15;
Var A: Array [1..n, 1..m] Of Integer;
B: Array[1..n] of Integer;
C: Array[1..n] of Real;
min, sum, count, i, j: Integer;
Begin
Randomize;
For i := 1 To n Do
For j := 1 To m Do
A[i, j] := Random(max * 2) - max;
min := max;
For i := 1 To n Do
For j := 1 To m Do
If A[i, j] < min Then
min := A[i, j];
For i := 1 To n Do
For j := 1 To m Do
If A[i, j] = min Then
B[i] := 1;
sum := 0;
count := 0;
For i := 1 To n Do
Begin
For j := 1 To m Do
If (A[i, j] Mod 2 = 0) And (A[i, j] >= 0) Then
Begin
sum := sum + A[i, j];
count := count + 1;
End;
C[i] := sum / count;
sum := 0;count := 0;
End;
WriteLn('Массив A:');
For i := 1 To n Do
Begin
For j := 1 To m Do
Write(A[i, j], ' ');
WriteLn;
End;
WriteLn('Массив B:');
For i := 1 To n DoWrite(B[i], ' ');
WriteLn;
WriteLn('Массив C (среднее арифметиеское положительных четных элементов массива A):');
For i := 1 To n Do
Write(C[i]:5:2, ' ');
ReadLn;
End.