program zadacha;
var
a: array[1..1000] of byte;
i,j,n,k:integer;
begin
writeln('vvedite kol-vo elementov massiva');
readln(n);
writeln('vvedite elementi massiva');
for i:=1 to n do read(a[i]);
for i:=1 to n-1 do
for j:=1 to n-1 do
if a[j]>a[j+1] then begin
k:=a[j];
a[j]:=a[j+1];
a[j+1]:=k;
end;
write('massiv posle sortirovki:');
for i:=1 to n do
write(a[i]:4);
writeln;
end.
program zadacha;
var
a: array[1..1000] of byte;
i,j,n,k:integer;
begin
writeln('vvedite kol-vo elementov massiva');
readln(n);
writeln('vvedite elementi massiva');
for i:=1 to n do read(a[i]);
for i:=1 to n-1 do
for j:=1 to n-1 do
if a[j]>a[j+1] then begin
k:=a[j];
a[j]:=a[j+1];
a[j+1]:=k;
end;
write('massiv posle sortirovki:');
for i:=1 to n do
write(a[i]:4);
writeln;
end.