var j,i,buf:integer;
mass:array[1..4] of integer;
begin
for i:=1 to 4 do
mass[i]:=random(100);
write(mass[i],' ');
end;
for i:=1 to 4-1 do
for j:=1 to 4-i do
if (mass[j] > mass[j+1]) then
buf := mass[j];
mass[j] := mass[j+1];
mass[j+1] := buf;
writeln;
write('Наиболший элемент=',mass[4]);
end.
var j,i,buf:integer;
mass:array[1..4] of integer;
begin
for i:=1 to 4 do
begin
mass[i]:=random(100);
write(mass[i],' ');
end;
for i:=1 to 4-1 do
for j:=1 to 4-i do
if (mass[j] > mass[j+1]) then
begin
buf := mass[j];
mass[j] := mass[j+1];
mass[j+1] := buf;
end;
writeln;
for i:=1 to 4 do
begin
write(mass[i],' ');
end;
writeln;
write('Наиболший элемент=',mass[4]);
end.