habs jetzt bast da schau und staune
unit Unit8;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Edit4: TEdit;
Edit5: TEdit;
Edit6: TEdit;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.Button1Click(Sender: TObject);
var
a,b,c,d,e,f : integer;
begin
randomize;
repeat
a:=random(46);
b:=random(46);
c:=random(46);
d:=random(46);
e:=random(46);
f:=random(46);
until (a<>b) and (a<>c)and (a<>d) and (a<>e) and (a<>f) and
(b<>a) and (b<>c) and (b<>d) and (b<>e) and (b<>f) and
(c<>a) and (c<>b) and (c<>d) and (c<>e) and (c<>f) and
(d<>a) and (d<>b) and (d<>c) and (d<>e) and (d<>f) and
(e<>a) and (e<>b) and (e<>c) and (e<>d) and (e<>f) and
(f<>a) and (f<>b) and (f<>c) and (f<>d) and (f<>e);
edit1.text := inttostr(a+1);
edit2.text := inttostr(b+1);
edit3.text := inttostr(c+1);
edit4.text := inttostr(d+1);
edit5.text := inttostr(e+1);
edit6.text := inttostr(f+1);
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
close;
end;
end.