unit Unit1;

interface

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

type
  TForm1 = class(TForm)
    Button1: TButton;
    Button2: TButton;
    Button3: TButton;
    Button4: TButton;
    Button5: TButton;
    procedure Button5Click(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;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var
  tablica10Int :array[0..9] of Integer;
  i,j :Integer;
  t :Integer;
  s :String;
begin
//inicjacja
Randomize;
for i:=0 to 9 do tablica10Int[i]:=Random(10);

s:='Przed sortowaniem: ';
for i:=0 to 9 do s:=s+' '+IntToStr(tablica10Int[i]);
ShowMessage(s);

//sortowanie
for i:=0 to 9-1 do
  for j:=i+1 to 9 do
    if tablica10Int[i]>tablica10Int[j] then
      begin
      t:=tablica10Int[i];
      tablica10Int[i]:=tablica10Int[j];
      tablica10Int[j]:=t;
      end;

s:='Po sortowaniu: ';
for i:=0 to 9 do s:=s+' '+IntToStr(tablica10Int[i]);
ShowMessage(s);
end;

procedure TForm1.Button2Click(Sender: TObject);
var
  tablica10Int :array[0..9] of Byte;
  i :Integer;
  ti :Byte;
begin
Randomize;
for i:=0 to 9 do tablica10Int[i]:=Random(10);
Caption:='';
for ti in tablica10Int do Caption:=Caption+' '+IntToStr(ti);
{for i:=0 to Length(tablica10Int) do Caption:=Caption+' '+IntToStr(tablica10Int[i]);}
end;

procedure TForm1.Button3Click(Sender: TObject);
var
  tablica10x20Int :array[0..9,0..19] of Integer;
  i,j :Integer;
begin
for i:=0 to 9 do
  for j:=0 to 19 do
    tablica10x20Int[i,j]:=0;
end;

procedure TForm1.Button4Click(Sender: TObject);
type Macierz3x3 = array[0..2,0..2] of Double;
var a,b,c :Macierz3x3;
begin

end;

procedure TForm1.Button5Click(Sender: TObject);
var
  tablicaDynInt : array of Integer;
  i :Integer;
  rozmiar :Integer;
begin
rozmiar:=10;
SetLength(tablicaDynInt,rozmiar);
for i:=0 to Length(tablicaDynInt)-1 do
  tablicaDynInt:=0;
end;

end.
