uses
crt;
const
str=4;{количество строк}
sto=4;{количество столбцов}
var
a:array [1..str,1..sto] of integer;
i,j,cs,c0:integer;
begin
clrscr;
cs:=0;
{заполняем и выыводим массив}
writeln('Исходная матрица А:');
for i:=1 to str do
begin
c0:=0;
for j:=1 to sto do
begin
a[i,j]:=random(8)-4;
if a[i,j]=0 then
inc(c0);
write(a[i,j]:2,' ')
end;
if c0=2 then
inc(cs);
writeln
end;
writeln('В данной матрице таких строк: ',cs)
end.