var
 i : byte;
 j : byte;
 k : byte;
 z : byte;
 n : array [5] of byte;
 m : byte;
endvar
begin
 equal:i,{0};
 for i={1} to {5} do
  write("Введите элемент ");
  read(z);
  equal:n[{i}],{z};
 endfor;
 for k={2} to {5} do
  equal:z,{k};
  for j={1} to {5} do
   if {n[{z}]}<{n[{z-1}]}&{z}>={2} then
    equal:m,{n[{z}]};
    equal:n[{z}],{n[{z-1}]};
    equal:n[{z-1}],{m};
    equal:z,{z-1};
   endif;
  endfor;
 endfor;
 writeln(" ");
 write("Отсортированный массив ");
 for i={1} to {5} do
  write({n[{i}]});
  write(" ");
 endfor;
end