const
n = 10;
var
a:array[1..n] of integer;
i, j:integer;
begin
randomize;
writeln('Исходный массив:');
for i := 1 to n do
begin
a[i] := random(101);
write(a[i], ' ');
end;
for i := 1 to n - 1 do
for j := 1 to n - i do
if a[j] mod 10 > a[j + 1] mod 10 then
begin
a[j] := a[j] + a[j + 1];
a[j + 1] := a[j] - a[j + 1];
a[j] := a[j] - a[j + 1];
end;
writeln;
writeln('Результат:');
for i := 1 to n do
write(a[i], ' ');
writeln;
end.
Var s,s1:string; p:byte;
<span>begin readln(s); for p:=length(s) downto 1 do s1:=s1+s[p]; </span>
<span>writeln(s1); end.</span>
От 0--15 или от -7 до 0 со знаком