Program p1; uses crt; const N = 5; M = 3; var x:array [1..N,1..M] of integer; j,i,z,k:integer; begin read(z); for i:=1 to N do begin For j:=1 to M do begin x[i,j]:= random (5)-2; write(x[i,j]:4); end; writeln; end;
For i:=1 to N do begin K:=0; For j:=1 to M do begin If (x[i,j]>=0) and (x[i,j] = z)then K:= K+1; end; writeln('Кол-во повторений =',k,' в ',i,' строке'); end; end.
uses crt;
const N = 5;
M = 3;
var x:array [1..N,1..M] of integer;
j,i,z,k:integer;
begin
read(z);
for i:=1 to N do begin
For j:=1 to M do begin
x[i,j]:= random (5)-2;
write(x[i,j]:4);
end;
writeln;
end;
For i:=1 to N do begin
K:=0;
For j:=1 to M do begin
If (x[i,j]>=0) and (x[i,j] = z)then
K:= K+1;
end;
writeln('Кол-во повторений =',k,' в ',i,' строке');
end;
end.