Const N = 3; Var A:array[1..N,1..N] of integer; i,j,k:integer; Begin Randomize; WriteLn('Исходный массив A(',N,',',N,'):'); k:=0; For i:= 1 to N do Begin For j:= 1 to N do Begin A[i,j]:=random(50); Write(A[i,j]:4); if (j>i)and(A[i,j] mod 2 = 0) then k:=k+1; End; WriteLn; End; WriteLn('k = ',k); End.
N = 3;
Var
A:array[1..N,1..N] of integer;
i,j,k:integer;
Begin
Randomize;
WriteLn('Исходный массив A(',N,',',N,'):');
k:=0;
For i:= 1 to N do
Begin
For j:= 1 to N do
Begin
A[i,j]:=random(50);
Write(A[i,j]:4);
if (j>i)and(A[i,j] mod 2 = 0) then k:=k+1;
End;
WriteLn;
End;
WriteLn('k = ',k);
End.