Autor Beitrag
Ghost40k
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 22

Windows XP Pro x64 Edition
Delphi 2005,Html,ActionScript,Php etc
BeitragVerfasst: Di 16.01.07 21:32 
ah danke es funktioniert , so wie gewollt!
Vielen vielen dank! ... hab da aber noch ne andere frage ^^ schreib se einfach mal ins gleiche thread ...
und zwar hab ich random zahlen generiert mit
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
e1:=random(10)+1;
e2:=random(10)+1;
e3:=random(11);
e4:=random(10)+1;
e5:=random(10)+1;
e6:=random(11);
edit1.text:=inttostr(e1);
edit2.text:=inttostr(e2);
edit3.text:=inttostr(e3);
edit4.text:=inttostr(e4);
edit5.text:=inttostr(e5);
edit6.text:=inttostr(e6);

,so , wie bekomm ichs jetzt noch hin , dass die random zahlen immer unterschiedlich sind in einem Bruch [also bei e1 e2 e3 , also nich 0 0/1 rauskommt zB]

Moderiert von user profile iconGausi: Abgetrennt von [url=www.delphi-forum.de/...?t=68757]hier[/URL].
Moderiert von user profile iconGausi: Delphi-Tags hinzugefügt
Saubäär
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 376



BeitragVerfasst: Di 16.01.07 21:37 
Hi Ghost,

eigentlich müsste das in nen neuen Thread (glaub ich).

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
RANDOMIZE; // Initialisiert den Zufallsgenerator
e1:=random(10)+1;
e2:=random(10)+1; 
.
.
.


Gruß

Bäär
Flamefire
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1207
Erhaltene Danke: 31

Win 10
Delphi 2009 Pro, C++ (Visual Studio)
BeitragVerfasst: Mi 17.01.07 07:00 
Zitat:
so , wie bekomm ichs jetzt noch hin , dass die random zahlen immer unterschiedlich sind in einem Bruch [also bei e1 e2 e3 , also nich 0 0/1 rauskommt zB]

ich versteh die Frage nicht...
willst du, dass keine 0 vorkommt? oder dass e1<>e2<>e3 ist?
bei 2.)
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
e1:=random(10)+1;
do
  e2:=random(10)+1;
until e2<>e1;
do
  e3:=random(10)+1;
until (e3<>e1) and (e3<>e2);
Marc.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1876
Erhaltene Danke: 129

Win 8.1, Xubuntu 15.10

BeitragVerfasst: Mi 17.01.07 15:56 
hast du randomize; irgendwo in deinem quellcode stehen? ;)
Flamefire
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1207
Erhaltene Danke: 31

Win 10
Delphi 2009 Pro, C++ (Visual Studio)
BeitragVerfasst: Mi 17.01.07 16:17 
user profile iconMarc. hat folgendes geschrieben:
hast du randomize; irgendwo in deinem quellcode stehen? ;)

ich? nö...
das gehört in das create event des forms...randomize ruft man nur einmal auf...
Marc.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1876
Erhaltene Danke: 129

Win 8.1, Xubuntu 15.10

BeitragVerfasst: Mi 17.01.07 16:25 
user profile iconFlamefire hat folgendes geschrieben:
user profile iconMarc. hat folgendes geschrieben:
hast du randomize; irgendwo in deinem quellcode stehen? ;)

ich? nö...
das gehört in das create event des forms...randomize ruft man nur einmal auf...


Die Frage war an user profile iconGhost40k gerichtet. ;)
Ghost40k Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 22

Windows XP Pro x64 Edition
Delphi 2005,Html,ActionScript,Php etc
BeitragVerfasst: Do 18.01.07 10:40 
ja hab ich :)