Const n=5; var a:array[1..n,1..n]of integer; i,j,k:integer; begin for i:=1 to n do begin for j:=1 to n do begin a[i,j]:=random(10); write(a[i,j]:3); end; writeln; end; j:=n; for i:=1 to n do begin if a[i,j]<5 then k:=k+1; j:=j-1; end; writeln('ответ: ',k); end.
n=5;
var
a:array[1..n,1..n]of integer;
i,j,k:integer;
begin
for i:=1 to n do
begin
for j:=1 to n do
begin
a[i,j]:=random(10);
write(a[i,j]:3);
end;
writeln;
end;
j:=n;
for i:=1 to n do
begin
if a[i,j]<5 then k:=k+1;
j:=j-1;
end;
writeln('ответ: ',k);
end.