
06.06.2010, 21:21
|
 |
Активный
|
|
Регистрация: 24.04.2010
Адрес: Украина, Кременчуг
Сообщения: 249
Репутация: 22
|
|
Держи что не ясно пиши
PHP код:
var
Form1: TForm1;
f:file of integer;
implementation
{$R *.dfm}
function SerchInFile(i:integer):boolean;
var
j:integer;
begin
result:=false;
reset(f);
while not EOF(f) do
begin
read(f,j);
if j=i then
begin
result:=true;
exit;
end;
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
var
max,min,i,j:integer;
begin
assignFile(f,'D:\1.txt');
reset(f);
read(f,max);
min:=max;
while not EOF(f) do
begin
read(f,j);
if j>max then max:=j;
if j<min then min:=j;
end;
for i:=min+1 to max-1 do
if not SerchInFile(i) then memo1.Lines.Add(inttostr(i));
closeFile(f);
end;
__________________
Не твори зла, и жизнь повернется к тебе передом
|