Var
z:array[1..9]of integer;
i:integer;
begin
randomize;
for i:= 1 to 9 do
begin
z[i]:= 3 + random(7);
write(z[i], ' ');
end;
for i:= 1 to 9 do
if i mod 2 = 1 then
z[i] := i;
Writeln;
for i:= 1 to 9 do
write(z[i], ' ');
end.
Пример:
4 4 5 6 8 4 3 5 5
1 4 3 6 5 4 7 5 9