Var N1:array[1..10] of integer; N2:array[1..15] of integer; R1:array[1..10] of integer; R2:array[1..15] of integer; min1, min2, max1, max2, i:integer; R1min, R2min, R1max, R2max:integer; begin min1:=500; min2:=500; max1:=0; max2:=0; randomize; for i:=1 to 10 do N1[i]:=random(900)+100; for i:=1 to 15 do N2[i]:=random(900)+100; for i:=1 to 10 do R1[i]:=random(500); for i:=1 to 15 do R2[i]:=random(500); for i:=1 to 10 do if R1[i]<min1 then begin min1:=R1[i]; R1min:=i; end else begin if R1[i]>max1 then begin max1:=R1[i]; R1max:=i; end; end; for i:=1 to 15 do if R2[i]<min2 then begin min2:=R2[i]; R2min:=i; end else begin if R2[i]>max2 then begin max2:=R2[i]; R2max:=i; end; end; writeln('v 1 taxoparke min ', N1[R1min]); writeln('vo 2 taxoparke min ', N2[R2min]); writeln('v 1 taxoparke max ', N1[R1max]); writeln('vo 2 taxoparke max ', N2[R2max]); write('N1 '); for i:=1 to 10 do write(N1[i], ' '); writeln; write('R1 '); for i:=1 to 10 do write(R1[i]:3, ' '); writeln; write('N2 '); for i:=1 to 15 do write(N2[i], ' '); writeln; write('R1 '); for i:=1 to 15 do write(N1[i]:3, ' '); writeln; end.
Var H1:array[1..5] of integer; H2:array[1..8] of integer; N1:array[1..5] of integer; N2:array[1..8] of integer; i, j:integer;
begin randomize; for i:=1 to 5 do {заполняем массивы} begin H1[i]:=random(10); N1[i]:=random(10); end; for i:=1 to 8 do begin H2[i]:=random(10); N2[i]:=random(10); end; for i:=1 to 5 do {сравниваем продукцию} for j:=1 to 8 do if N1[i]=N2[j] then writeln(i, ' и ', j, ' Выпускают одинаковую продукц.'); write('H1 ');{выводим массивы} for i:=1 to 5 do write(H1[i], ' '); writeln; write('N1 '); for i:=1 to 5 do write(n1[i], ' '); writeln; write('H2 '); for i:=1 to 8 do write(H2[i], ' '); writeln; write('N2 '); for i:=1 to 8 do write(N2[i], ' '); writeln; end.
N2:array[1..15] of integer;
R1:array[1..10] of integer;
R2:array[1..15] of integer;
min1, min2, max1, max2, i:integer;
R1min, R2min, R1max, R2max:integer;
begin
min1:=500;
min2:=500;
max1:=0;
max2:=0;
randomize;
for i:=1 to 10 do
N1[i]:=random(900)+100;
for i:=1 to 15 do
N2[i]:=random(900)+100;
for i:=1 to 10 do
R1[i]:=random(500);
for i:=1 to 15 do
R2[i]:=random(500);
for i:=1 to 10 do
if R1[i]<min1 then
begin
min1:=R1[i];
R1min:=i;
end else
begin
if R1[i]>max1 then
begin
max1:=R1[i];
R1max:=i;
end;
end;
for i:=1 to 15 do
if R2[i]<min2 then
begin
min2:=R2[i];
R2min:=i;
end else
begin
if R2[i]>max2 then
begin
max2:=R2[i];
R2max:=i;
end;
end;
writeln('v 1 taxoparke min ', N1[R1min]);
writeln('vo 2 taxoparke min ', N2[R2min]);
writeln('v 1 taxoparke max ', N1[R1max]);
writeln('vo 2 taxoparke max ', N2[R2max]);
write('N1 ');
for i:=1 to 10 do
write(N1[i], ' ');
writeln;
write('R1 ');
for i:=1 to 10 do
write(R1[i]:3, ' ');
writeln;
write('N2 ');
for i:=1 to 15 do
write(N2[i], ' ');
writeln;
write('R1 ');
for i:=1 to 15 do
write(N1[i]:3, ' ');
writeln;
end.
H2:array[1..8] of integer;
N1:array[1..5] of integer;
N2:array[1..8] of integer;
i, j:integer;
begin
randomize;
for i:=1 to 5 do {заполняем массивы}
begin
H1[i]:=random(10);
N1[i]:=random(10);
end;
for i:=1 to 8 do
begin
H2[i]:=random(10);
N2[i]:=random(10);
end;
for i:=1 to 5 do {сравниваем продукцию}
for j:=1 to 8 do
if N1[i]=N2[j] then writeln(i, ' и ', j, ' Выпускают одинаковую продукц.');
write('H1 ');{выводим массивы}
for i:=1 to 5 do
write(H1[i], ' ');
writeln;
write('N1 ');
for i:=1 to 5 do
write(n1[i], ' ');
writeln;
write('H2 ');
for i:=1 to 8 do
write(H2[i], ' ');
writeln;
write('N2 ');
for i:=1 to 8 do
write(N2[i], ' ');
writeln;
end.