AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Lottogenerator ERLEDIGT!

Ein Thema von PhilPhil · begonnen am 28. Feb 2007 · letzter Beitrag vom 28. Feb 2007
 
Benutzerbild von zecke
zecke

Registriert seit: 17. Jan 2004
494 Beiträge
 
Turbo Delphi für Win32
 
#6

Re: Lottogenerator

  Alt 28. Feb 2007, 17:44


ich habe mal so etwas gemacht und habe nichts wirklich besseres gefunden, als du schon sagtest. bin aber nicht gerade ein delphi-meister. vielleicht hilft dir mein code trotzdem weiter:

Delphi-Quellcode:

var zahl1,zahl2,zahl3,zahl4,zahl5,zahl6 : integer;

// etc...

function zahlenziehen():integer;
begin
// Zufallsgenerator neu
randomize;

// Zahlen zuweisen
zahl11:=random(49)+1;

begin
  repeat
      zahl2:=random(49)+1;
  until
      zahl1<>zahl2;
end;

begin
  repeat
      zahl3:=random(49)+1;
  until
      (zahl1<>zahl3) and (zahl2<>zahl3);
end;
begin
  repeat
      zahl4:=random(49)+1;
  until
      (zahl1<>zahl4) and (zahl2<>zahl4) and (zahl3<>zahl4);
end;
begin
  repeat
      zahl5:=random(49)+1;
  until
      (zahl1<>zahl5) and (zahl1<>zahl5) and (zahl3<>zahl5) and (zahl4<>zahl5);
end;
begin
  repeat
      zahl6:=random(49)+1;
  until
      (zahl1<>zahl6) and (zahl2<>zahl6) and (zahl3<>zahl6) and (zahl4<>zahl6) and (zahl5<>zahl6);
end;
end;
mfg zecke
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 10:20 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz