# Well you could do it the hard way

FOR i1 = 1 TO 8
FOR i2 = 1 TO 8
IF i2 = i1 THEN 10
FOR i3 = 1 TO 8
IF i3 = i2 OR i3 = i1 THEN 20
FOR i4 = 1 TO 8
IF i4 = i3 OR i4 = i2 OR i4 = i1 THEN 30
FOR i5 = 1 TO 8
IF i5 = i4 OR i5 = i3 OR i5 = i2 OR i5 = i1 THEN 40
FOR i6 = 1 TO 8
IF i6 = i5 OR i6 = i4 OR i6 = i3 OR i6 = i2 OR i6 = i1 THEN 50
FOR i7 = 1 TO 8
IF i7 = i6 OR i7 = i5 OR i7 = i4 OR i7 = i3 OR i7 = i2 OR i7 = i1 THEN 60
FOR i8 = 1 TO 8
IF i8 = i7 OR i8 = i6 OR i8 = i5 OR i8 = i4 OR i8 = i3 OR i8 = i2 OR i8 = i1 THEN 70
q\$ = CHR\$(i1 + 96) + CHR\$(i2 + 96) + CHR\$(i3 + 96) + CHR\$(i4 + 96)
q\$ = q\$ + CHR\$(i5 + 96) + CHR\$(i6 + 96) + CHR\$(i7 + 96) + CHR\$(i8 + 96)
PRINT q\$
kk = kk + 1
70 NEXT i8
60 NEXT i7
50 NEXT i6
40 NEXT i5
30 NEXT i4
20 NEXT i3
10 NEXT i2
NEXT i1
PRINT kk

Posted on Aug 2, 2010, 5:09 AM

 Response Title Author and Date Sure, any excuse to use GOTO and line numbers. Pete on Aug 2 We've had that challenge before David on Aug 2 Re: We've had that challenge before Pete on Aug 2 Re: Well you could do it the hard way codeguy on Sep 5