unit Unit15;

interface

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

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

var
  Form15: TForm15;
          d:integer;
implementation

{$R *.dfm}

procedure TForm15.Button1Click(Sender: TObject);
begin
 Form15.Close;
end;

procedure TForm15.Button2Click(Sender: TObject);
var s:string;
begin
d:=0;
if Edit1.Text='1' then d:=d+1;
if edit2.Text='4' then d:=d+1;
if edit3.Text='10' then d:=d+1;
if edit4.Text='40' then d:=d+1;
if edit4.Text='375' then d:=d+1;
if d=4 then
begin
  unit2.p3:=true;
  unit2.form2.done3.visible:=true;
  unit2.form2.praktika4.Visible:=true;
 ShowMessage('Задание решено верно');
 Form15.Close;
end
else
begin
d:=d*20;
 s:='Задание решено верно на '+IntToStr(d)+'%';
 ShowMessage(s);
end;
end;

end.
