Ответ:
pascal
Объяснение:
var
i, j ,k: integer;
l, lnew: string;
a: array of integer;
begin
Write('Введите число >> ');
ReadLn(l);
SetLength(a ,length(l));
for i := 0 to length(l) - 1 do
a[i] := strtoint(l[i + 1]);
for i := 0 to length(l) - 2 do
for j := i + 1 to length(l) - 1 do
if a[i] > a[j] then
k := a[i];
a[i] := a[j];
a[j] := k;
end;
lnew := lnew + inttostr(a[i]);
WriteLn('Новое число равно ', lnew);
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Ответ:
pascal
Объяснение:
var
i, j ,k: integer;
l, lnew: string;
a: array of integer;
begin
Write('Введите число >> ');
ReadLn(l);
SetLength(a ,length(l));
for i := 0 to length(l) - 1 do
a[i] := strtoint(l[i + 1]);
for i := 0 to length(l) - 2 do
for j := i + 1 to length(l) - 1 do
if a[i] > a[j] then
begin
k := a[i];
a[i] := a[j];
a[j] := k;
end;
for i := 0 to length(l) - 1 do
lnew := lnew + inttostr(a[i]);
WriteLn('Новое число равно ', lnew);
end.