Я составил, но она неправильно работает!!!
Вот прога:
Program ABC;
const
n=10;
type
mas=array[1..n,1..n] of integer;
var
i,j,y,k:integer;
a:mas;
function search(a:mas):integer;
var
i,j,k:integer;
key:array[1..n] of boolean;
Begin
for i:=1 to n do key[i]:=false;
for i:=n downto 1 do begin
for j:=1 to n do
if key[j] then search:=i
else search:=0;
for j:=n downto 1 do
if a[i,j]<0 then key[j]:=true;
end;
end;
begin
randomize;
for i:=1 to n do begin
writeln;
for j:=1 to n do begin
a[i,j]:=random(15)-10;
write(a[i,j]:3);
end;
end;
y:=search(a);
if y<>0 then writeln('Nomer stroki: ',y)
else writeln('Net takogo');
End.