unit Unit1;

interface

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

type
  TForm1 = class(TForm)
    StringGrid1: TStringGrid;
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);
var i,j: byte;
begin
  for i:=1 to 9 do
  begin
    StringGrid1.Cells[i,0]:=IntToStr(i);
    StringGrid1.Cells[0,i]:=IntToStr(i);
  end;

  for i:=1 to 9 do
    for j:=1 to 9 do
      StringGrid1.Cells[j,i]:=IntToStr(i*j);

end;

end.
