Einzelnen Beitrag anzeigen

dino

Registriert seit: 15. Jul 2006
Ort: Bad Münstereifel
627 Beiträge
 
Delphi 5 Professional
 
#9

Re: "ABCD" in allen möglichen Kombinationen

  Alt 4. Okt 2006, 21:54
hab da was Programmiert für ein Wort mit 7 Buchstaben

Delphi-Quellcode:
var i1,i2,i3,i4,i5,i6,i7:Integer;
begin
s:=edit1.text;
for i1:=1 to 7 do
for i2:=1 to 7 do
if i1<>i2 then
for i3:=1 to 7 do
if (i1<>i3)and(i2<>i3) then
for i4:=1 to 7 do
if (i1<>i4)and(i2<>i4)and(i3<>i4) then
for i5:=1 to 7 do
if (i1<>i5)and(i2<>i5)and(i3<>i5)and(i4<>i5) then
for i6:=1 to 7 do
if (i1<>i6)and(i2<>i6)and(i3<>i6)and(i4<>i6)and(i5<>i6) then
for i7:=1 to 7 do
if (i1<>i7)and(i2<>i7)and(i3<>i7)and(i4<>i7)and(i5<>i7)and(i6<>i7) then
listbox1.Items.add(s[i1]+s[i2]+s[i3]+s[i4]+s[i5]+s[i6]+s[i7]);
Angehängte Dateien
Dateityp: exe project1_833.exe (308,0 KB, 32x aufgerufen)
  Mit Zitat antworten Zitat