unit Unit_m;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  Menus, StdCtrls, Buttons;

type
  TForm2 = class(TForm)
    Label5: TLabel;
    Edit5: TEdit;
    BitBtn1: TBitBtn;

    procedure BitBtn1Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form2: TForm2;
  s,s1,s2,s3,s4:string;
  ft,fp:textfile;
  code,fl:integer;
implementation
{$R *.DFM}

procedure TForm2.FormCreate(Sender: TObject);
begin
  with form2 do
 begin
  assignfile(ft,'topozn.txt');
  reset(ft);
  repeat
    readln(ft,s);
  until eof(ft);
  closefile(ft);

  assignfile(fp,'persent.txt');
  reset(fp);
  readln(fp,s);
  readln(fp,s);
  readln(fp,s);
  readln(fp,s);
  readln(fp,s);
  edit5.text:=s;
  closefile(fp)
 end;
end;



procedure TForm2.BitBtn1Click(Sender: TObject);
begin


  assignfile(fp,'persent.txt');
  rewrite(fp);
  with form2 do
  begin
    writeln(fp,edit5.text);
  end;
  closefile(fp);
  close
end;

end.
