Uses crt; const n=5; var a:array[1..n] of integer; i,p:integer; begin for i:=1 to n do read(a[i]); repeat p:=0; for i:=1 to n-1 do if a[i]<a[i+1] then begin p:=1; a[i]:=a[i]+a[i+1]; a[i+1]:=a[i]-a[i+1]; a[i]:=a[i]-a[i+1]; end; until p=0; for i:=1 to n do writeln(a[i]); end.
const n=5;
var a:array[1..n] of integer;
i,p:integer;
begin
for i:=1 to n do
read(a[i]);
repeat
p:=0;
for i:=1 to n-1 do
if a[i]<a[i+1] then
begin
p:=1;
a[i]:=a[i]+a[i+1];
a[i+1]:=a[i]-a[i+1];
a[i]:=a[i]-a[i+1];
end;
until p=0;
for i:=1 to n do
writeln(a[i]);
end.