Program Zadachcka;
Const n=5; m=3;
Var A : array [1..n, 1..m] of integer;
i, j, s : integer;
begin
Randomize;
For i:=1 to n do
For j:=1 to m do A[i,j]:=random(100);
end;
Writeln('Array A:');
For j:=1 to m do Write(A[i,j]:4);
Writeln;
s:=0;
For j:=1 to m do
If ((A[i,j] mod 2) = 0) then s:=s+i+j;
Writeln('S=',s);
Readln;
end.
Program Zadachcka;
Const n=5; m=3;
Var A : array [1..n, 1..m] of integer;
i, j, s : integer;
begin
Randomize;
For i:=1 to n do
begin
For j:=1 to m do A[i,j]:=random(100);
end;
Writeln('Array A:');
For i:=1 to n do
begin
For j:=1 to m do Write(A[i,j]:4);
Writeln;
end;
s:=0;
For i:=1 to n do
begin
For j:=1 to m do
begin
If ((A[i,j] mod 2) = 0) then s:=s+i+j;
end;
end;
Writeln('S=',s);
Readln;
end.