Program Praktik7;
Uses crt;
Var matrica: array[1..5,1..10] of integer;
Var i,j,nmax,k,kmax:integer;
Begin
For i:=1 to 5 do
for j:=1 to 10 do
matrica[i,j]:=random(2);
nmax:=1;kmax:=0;
For J:=1 to 10 do
if matrica[1,j]=0 then kmax:=kmax+1;
For i:=2 to 5 do
begin
k:=0;
for j:=1 to 10 do
if matrica[i,j]=0 then k:=k+1;
if k>kmax then
begin
kmax:=k;
nmax:=i;
end;
end;
For i:=1 to 5 do
Begin
for j:=1 to 10 do
Write (matrica[i,j]:4);
Writeln;
End;
Writeln (‘Номер строки ',nmax);
Write(‘Количество нулей ',kmax);
Readkey
End.
Uses crt;
Var matrica: array[1..5,1..10] of integer;
Var i,j,nmax,k,kmax:integer;
Begin
For i:=1 to 5 do
for j:=1 to 10 do
matrica[i,j]:=random(2);
nmax:=1;kmax:=0;
For J:=1 to 10 do
if matrica[1,j]=0 then kmax:=kmax+1;
For i:=2 to 5 do
begin
k:=0;
for j:=1 to 10 do
if matrica[i,j]=0 then k:=k+1;
if k>kmax then
begin
kmax:=k;
nmax:=i;
end;
end;
For i:=1 to 5 do
Begin
for j:=1 to 10 do
Write (matrica[i,j]:4);
Writeln;
End;
Writeln (‘Номер строки ',nmax);
Write(‘Количество нулей ',kmax);
Readkey
End.