Uses crt; const n=15; var a:array[1..n] of integer; i,p,min:integer; begin for i:=1 to n do read(a[i]); min:=a[1]; for i:=1 to n do if a[i]<min then min:=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; writeln; writeln(min); writeln; for i:=1 to n do write(a[i]:3); end.
const n=15;
var a:array[1..n] of integer;
i,p,min:integer;
begin
for i:=1 to n do
read(a[i]);
min:=a[1];
for i:=1 to n do
if a[i]<min then min:=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;
writeln;
writeln(min);
writeln;
for i:=1 to n do
write(a[i]:3);
end.