programzadacha;
var
a:array[1..1000] of byte;
i,j,n,k:integer;
begin
writeln('vveditekol-vo elementov massiva');
readln(n);
writeln('vvediteelementi massiva');
for i:=1 ton do read(a[i]);
for i:=1 ton-1 do
for j:=1 ton-1 do
ifa[j]>a[j+1] then begin
k:=a[j];
a[j]:=a[j+1];
a[j+1]:=k;
end;
write('massivposle sortirovki:');
for i:=1 ton do
write(a[i]:4);
writeln;
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
programzadacha;
var
a:array[1..1000] of byte;
i,j,n,k:integer;
begin
writeln('vveditekol-vo elementov massiva');
readln(n);
writeln('vvediteelementi massiva');
for i:=1 ton do read(a[i]);
for i:=1 ton-1 do
for j:=1 ton-1 do
ifa[j]>a[j+1] then begin
k:=a[j];
a[j]:=a[j+1];
a[j+1]:=k;
end;
write('massivposle sortirovki:');
for i:=1 ton do
write(a[i]:4);
writeln;
end.