unit uWzahl;

interface

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

type
  TForm1 = class(TForm)
    Grenze: TEdit;
    ErgebnisAus: TLabel;
    Label2: TLabel;
    Zaehlen: TButton;
    procedure ZaehlenClick(Sender: TObject);
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.ZaehlenClick(Sender: TObject);
var k, n : integer;
begin
  k := 0;
  n := StrToInt(Grenze.text);
  while k < n do
    begin
      k := k + 1;
      ErgebnisAus.caption := ErgebnisAus.caption+#13+'      '+ IntToStr(k);
    end;

end;

end.
