... four solutions:
192 384 576
219 438 657
273 546 819
327 654 981
CLS
a$ = "123456789": h$ = a$
DO
n1 = VAL(LEFT$(a$, 3))
n2 = VAL(MID$(a$, 4, 3))
n3 = VAL(RIGHT$(a$, 3))
IF n3 = 3 * n1 AND n2 = n3 - n1 THEN
PRINT n1; n2; n3
END IF
permute a$
LOOP UNTIL h$ = a$
|
Posted by Charlie
on 2005-07-21 16:15:01 |