1)
var
i,k:integer;
a:array [1..14] of integer;
begin
k:=0;
for i:=1 to 14 do
a[i]:=random(46)-15;
write(a[i]:3);
if a[i] mod 2=0 then k:=i;
end;
if k>0 then
for i:=k to 13 do a[i]:=a[i]+1;
a[14]:=0;
writeln;
for i:=1 to 14 do write(a[i]:3);
end.
2)
for i:=1 to 7 do
k:=a[i];
a[i]:=a[i+7];
a[i+7]:=k;
1)
var
i,k:integer;
a:array [1..14] of integer;
begin
k:=0;
for i:=1 to 14 do
begin
a[i]:=random(46)-15;
write(a[i]:3);
if a[i] mod 2=0 then k:=i;
end;
if k>0 then
begin
for i:=k to 13 do a[i]:=a[i]+1;
a[14]:=0;
end;
writeln;
for i:=1 to 14 do write(a[i]:3);
end.
2)
var
i,k:integer;
a:array [1..14] of integer;
begin
for i:=1 to 14 do
begin
a[i]:=random(46)-15;
write(a[i]:3);
end;
for i:=1 to 7 do
begin
k:=a[i];
a[i]:=a[i+7];
a[i+7]:=k;
end;
writeln;
for i:=1 to 14 do write(a[i]:3);
end.