Const a=10; type mas=array[1..a] of integer; mas1=array[1..3] of byte; var R, Q, P:mas; X:mas1; i:byte;
procedure Form(var R, Q, P:mas); var sr, sq, sp:byte; begin sr:=0; sq:=0; sp:=0; for i:=1 to a do begin if (R[i]>=2) and (R[i]<=4) then sr:=sr+R[i]; if (Q[i]>=2) and (R[i]<=4) then sq:=sq+R[i]; if (P[i]>=2) and (R[i]<=4) then sp:=sp+R[i]; end; x[1]:=sr; x[2]:=sq; x[3]:=sp; writeln('Massiv x'); for i:=1 to 3 do write(x[i]:3);
end;
begin randomize; for i:=1 to a do begin R[i]:=random(10); Q[i]:=random(10); P[i]:=random(10); end; writeln('Massiv r'); for i:=1 to a do write(R[i]:3); writeln; writeln('Massiv Q'); for i:=1 to a do write(Q[i]:3); writeln; writeln('Massiv P'); for i:=1 to a do write(P[i]:3); end.
auto = true;
var
a: array[1..100, 1..100]of real;
b: array[1..100]of real;
n, m, j, i: integer;
gmax, min, max: real;
begin
read(n, m);
for i := 1 to n do
for j := 1 to m do
begin
if auto then
a[i, j] := random(100)
else
read(a[i, j]);
if abs(gmax) < abs(a[i, j]) then
gmax := a[i, j];
end;
for i := 1 to n do
begin
min := a[i, 1] / gmax;
max := a[i, 1] / gmax;
for j := 1 to m do
begin
a[i, j] := a[i, j] / gmax;
if min > a[i, j] then min := a[i, j];
if max < a[i, j] then max := a[i, j];
write(a[i, j]:5:2, ' ');
end;
b[i] := max - min;
writeln(' => ', b[i]:5:2);
end;
end.
type mas=array[1..a] of integer;
mas1=array[1..3] of byte;
var R, Q, P:mas;
X:mas1;
i:byte;
procedure Form(var R, Q, P:mas);
var sr, sq, sp:byte;
begin
sr:=0;
sq:=0;
sp:=0;
for i:=1 to a do
begin
if (R[i]>=2) and (R[i]<=4) then sr:=sr+R[i];
if (Q[i]>=2) and (R[i]<=4) then sq:=sq+R[i];
if (P[i]>=2) and (R[i]<=4) then sp:=sp+R[i];
end;
x[1]:=sr;
x[2]:=sq;
x[3]:=sp;
writeln('Massiv x');
for i:=1 to 3 do
write(x[i]:3);
end;
begin
randomize;
for i:=1 to a do
begin
R[i]:=random(10);
Q[i]:=random(10);
P[i]:=random(10);
end;
writeln('Massiv r');
for i:=1 to a do
write(R[i]:3);
writeln;
writeln('Massiv Q');
for i:=1 to a do
write(Q[i]:3);
writeln;
writeln('Massiv P');
for i:=1 to a do
write(P[i]:3);
end.