Program fantscrin;
const n = 10;
Var a: array [1..n] of integer;
b: array [1..n] of integer;
i,j:integer;
Begin
j:=0;
for i:=1 to n do
a[i]:=random(20);
write(a[i], ' ');
if (i mod 2 <> 0) then
begin
j:=j+1;
b[j]:=a[i];
end;
writeln('');
a[i]:=0;
for i:=1 to j do
a[i]:=b[i];
writeln(j);
End.
Program fantscrin;
const n = 10;
Var a: array [1..n] of integer;
b: array [1..n] of integer;
i,j:integer;
Begin
j:=0;
for i:=1 to n do
a[i]:=random(20);
for i:=1 to n do
write(a[i], ' ');
for i:=1 to n do
if (i mod 2 <> 0) then
begin
j:=j+1;
b[j]:=a[i];
end;
writeln('');
for i:=1 to n do
a[i]:=0;
for i:=1 to j do
a[i]:=b[i];
for i:=1 to j do
write(a[i], ' ');
writeln('');
writeln(j);
End.