unit Unit1;

interface

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

type
  TForm1 = class(TForm)
    Image1: TImage;
    Button1: TButton;
    Label1: TLabel;
    Button2: TButton;
    Label2: TLabel;
    Label3: TLabel;
    Label4: TLabel;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var
a,b,c:integer;
begin
randomize;
    a:=random(10);
      b:=random(10);
       c:=random(10);
    Label1.Caption:=inttostr(a);
    Label2.Caption:= inttostr(b);
    Label3.Caption:= inttostr(c);
    If (Label1.Caption = '7') Or (Label2.Caption = '7') Or (Label3.Caption ='7') Then
        Image1.Visible:= True ;

end;

procedure TForm1.Button2Click(Sender: TObject);
begin
  Image1.Visible:= False ;
end;

end.
