assign(f,'file1.bin');
rewrite(f);
for i:=1 to 300 do
begin
a[i]:=random(201)-100;
write(f,a[i]);
end;
close(f);
assign(g,'file1.bin');
reset(g);
assign(h,'file2.bin');
rewrite(h);
for i:=1 to filesize(g) do
begin
read(g,a[i]);
if odd(a[i]) then write(h,a[i]);
end;
close(g);
close(h);