А можно чтоб паскаль выводил ответ,а то он выводит значения только файла F?
Код HTML:
uses crt;
Var
F,G:File of Integer;
i,N,P:Integer;
Begin
clrscr;
Assign(F,'D:\First');
Assign(G,'D:\Second');
ReWrite(F);
Randomize;
For i:=1 to 1000 do
begin
N:=-50+Random(101);
Write(F,N);
end;
Close(F);
ReSet(F);
ReWrite(G);
P:=0;
For i:=1 to 1000 do
begin
Read(F,N);
If (N mod 2)<>0 then
begin
Write(G,N);
P:=P+1;
end;
end;
Close(F);
Close(G);
ReSet(G);
For i:=1 to P do
begin
Read(G,N);
Write(N:4);
end;
Readln
End.