unit Unit14;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  dialogs, StdCtrls, unit2, jpeg, ExtCtrls;

type
  TForm14 = class(TForm)
    Image1: TImage;
    Label4: TLabel;
    Button1: TButton;
    Button2: TButton;
    Edit1: TEdit;
    Edit2: TEdit;
    Edit3: TEdit;
    Edit4: TEdit;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form14: TForm14;
  d:integer;
implementation

uses Unit7, Unit8;

{$R *.dfm}

procedure TForm14.Button1Click(Sender: TObject);
begin
Form14.Close;
end;

procedure TForm14.Button2Click(Sender: TObject);
var s:string;
begin
d:=0;
if Edit1.Text='EDF' then d:=d+1 else
  if Edit1.Text='edf' then d:=d+1;
if edit2.Text='F-ROPA' then d:=d+1 else
  if edit2.Text='f-ropa' then d:=d+1;
if edit3.Text='EDF' then d:=d+1 else
  if Edit3.Text='edf' then d:=d+1;
if edit4.Text='B-ROPA' then d:=d+1 else
  if edit4.Text='b-ropa' then d:=d+1;
if d=4 then
begin
  unit2.p2:=true;
  unit2.form2.done2.visible:=true;
  unit2.form2.praktika3.Visible:=true;
 ShowMessage('Задание решено верно');
 Form14.Close;
end
else
begin
d:=d*25;
 s:='Задание решено верно на '+IntToStr(d)+'%';
 ShowMessage(s);
end;
end;

end.
