Var a:array [1..10] of integer; i, n, p, j:integer; begin writeln('vvedite n'); readln(n); writeln('vvedite massiv'); for i:=1 to n do readln(a[i]); for i:=1 to n do for j:=i to n do if a[i]<a[j] then begin p:=a[i]; a[i]:=a[j]; a[j]:=p; end; writeln('posle sortirovki'); for i:=1 to n do write(a[i],' '); writeln(); end.
a:array [1..10] of integer;
i, n, p, j:integer;
begin
writeln('vvedite n');
readln(n);
writeln('vvedite massiv');
for i:=1 to n do
readln(a[i]);
for i:=1 to n do
for j:=i to n do
if a[i]<a[j] then
begin
p:=a[i];
a[i]:=a[j];
a[j]:=p;
end;
writeln('posle sortirovki');
for i:=1 to n do
write(a[i],' ');
writeln();
end.