unit Unit1;

interface

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

type
  TForm1 = class(TForm)
    Label1: TLabel;
    Button1: TButton;
    Button2: TButton;
    Label2: TLabel;
    Label3: TLabel;
    Button3: TButton;
    Button4: TButton;
    Label4: TLabel;
    Label5: TLabel;
    Label6: TLabel;
    Label7: TLabel;
    Label8: TLabel;
    procedure FormCreate(Sender: TObject);
    procedure Button4Click(Sender: TObject);
    procedure Button3Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;
      i,j,k: integer;
implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
  Label1.Caption:='Ala ma kota';
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
  Label2.Caption:=InttoStr(i); // gdzie i to zmienna globalna (i:integer;)
  i:=(i mod 10)+1;
end;

procedure TForm1.Button3Click(Sender: TObject);
begin
Label3.Caption:=Label3.Caption+InttoStr(j)+',';
 j:=j+1;

end;

procedure TForm1.Button4Click(Sender: TObject);
begin
Label4.Caption:=Label4.Caption+InttoStr(k)+#13; // znak #13 spowoduje przejście do
k:=k+1;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  label3.Caption:='';
  Label4.Caption:='';
end;

end.
