unit Unit1;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
  ExtCtrls;

type

  { TForm1 }

  TForm1 = class(TForm)
    Button1: TButton;
    Button2: TButton;
    Edit1: TEdit;
    Label1: TLabel;
    Memo1: TMemo;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private

  public

  end;

var
  Form1: TForm1;

implementation

{$R *.lfm}

{ TForm1 }


procedure TForm1.Button1Click(Sender: TObject);
var
  Zaehler: Integer;
  Ergebnis: LongInt;

begin
  zaehler:= 1;
  Memo1.clear;

  // for zaehler:= 1 to 10 do
  // begin
  //  ergebnis:= zaehler * StrToInt(Edit1.Text);
  //  Memo1.Lines.add(IntToStr(ergebnis));
  // end;
  //while zaehler <= 10 do
  //begin
  //  ergebnis:= zaehler * StrToInt(Edit1.Text);
  //  Memo1.Lines.add(IntToStr(ergebnis));
  //  inc(zaehler);
  //end;
  if Edit1.Text<>'' then
  begin

  repeat
     ergebnis:= zaehler * StrToInt(Edit1.Text);
     Memo1.Lines.add(IntToStr(ergebnis));
     inc(zaehler);
  until zaehler > 10;
  end;
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
  Application.Terminate;
end;

end.

