program sortirovka const 10 array of integer -2 -3 var max integer arr

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
program sortirovka;
const n=10;
a:array [1..n] of integer=(1,0,5,-2,6,4,-3,8,2,0);
var max,i,c,z:integer;
b:array [1..n] of integer;
begin
for i:=1 to n do
b[i]:=a[i];
max:=b[1];
for z:=1 to n-1 do
for i:=1 to n-z do
if b[i] > b[i+1] then
begin
c:=b[i];
b[i]:= b[i+1];
b[i+1]:= c;
end;
for i:= 1 to n do
writeln(' ',b[i]);
end.