Var a:array[1..10] of Integer ; b,i,k,f:integer; Begin WriteLn('Исходный массив'); For i:= 1 to 10 do begin a[i]:=Random(20)-10; Write(a[i]:3); end; For k:=1 to 9 do begin For i:= 1 to 9 do begin if a[i]< a[i+1] then begin b:=a[i]; a[i] := a[i+1]; a[i+1]:=b; end; end; end; WriteLn; WriteLn('Итоговый массив'); For i:= 1 to 10 do Write(a[i]:3); end.
b,i,k,f:integer;
Begin
WriteLn('Исходный массив');
For i:= 1 to 10 do
begin
a[i]:=Random(20)-10;
Write(a[i]:3);
end;
For k:=1 to 9 do
begin
For i:= 1 to 9 do
begin
if a[i]< a[i+1] then
begin
b:=a[i];
a[i] := a[i+1];
a[i+1]:=b;
end;
end;
end;
WriteLn;
WriteLn('Итоговый массив');
For i:= 1 to 10 do
Write(a[i]:3);
end.