Unit1.pas 706 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. unit Unit1;
  2. interface
  3. uses
  4. Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  5. Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls;
  6. type
  7. TForm1 = class(TForm)
  8. Button1: TButton;
  9. Edit1: TEdit;
  10. Edit2: TEdit;
  11. Label1: TLabel;
  12. Label2: TLabel;
  13. Edit3: TEdit;
  14. procedure Button1Click(Sender: TObject);
  15. private
  16. { Private-Deklarationen }
  17. public
  18. { Public-Deklarationen }
  19. end;
  20. var
  21. Form1: TForm1;
  22. implementation
  23. uses Math;
  24. {$R *.dfm}
  25. procedure TForm1.Button1Click(Sender: TObject);
  26. begin
  27. Edit3.Text:=inttostr(RandomRange(strtoint(Edit1.Text),strtoint(Edit2.Text)+1));
  28. end;
  29. end.