1)//Вправо
Const
n=10;
type
ty=array[1..n] of integer;
var
ar:ty;
i,k:integer;
procedure push(var ar:ty);
var
i,c:integer;
begin
c:=ar[n];
for i:=n downto 2 do
ar[i]:=ar[i-1];
ar[1]:=c;
end;
begin
randomize;
writeln('Enter K:');
readln(k);
writeln('First array:');
for i:=1 to n do
begin;
ar[i]:=random(10);
write(ar[i]:4);
end;
for i:=1 to k do
push(ar);
writeln;
writeln('Final array:');
for i:=1 to n do
write(ar[i]:4);
end.
2)var
a,i,b,r,n:integer;
s,se:string;
procedure preob(var a,b,n:integer; var se:string);
begin
repeat
b:=a mod n;
a:=a div n;
str(b,se);
s+=se;
until (a<=n-1);<br> end;
begin
readln(a);
readln(n);
preob(a,b,n,se);
str(a,se);
s+=se;
for i:=1 to length(s) div 2 do
begin;
se:=s[i];
s[i]:=s[length(s)-i+1];
s[length(s)-i+1]:=se[1];
end;
val(s,r,a);
write(r);
end.