unit Unit1;

interface

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

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

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var i: integer;
begin
  Label1.Caption:='';
  for i:=1 to 2 do
    Label1.Caption:=Label1.Caption+#13+Memo1.Lines[i];
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
   Memo1.Lines.Add( Inttostr(Random(10)) );
end;

end.
