CLS : 'Computes the 156 6-digit vampire numbers
FOR t1 = 100 TO 999
FOR t2 = t1 TO 999
FOR i = 0 TO 9: k%(i) = 0: NEXT i
t = t1 * t2
IF t > 99999 THEN
cntTOT = cntTOT + 1
s$ = RIGHT$(STR$(t1), 3) + RIGHT$(STR$(t2), 3)
FOR i = 1 TO 6
v = VAL(MID$(s$, i, 1)): k%(v) = k%(v) + 1
NEXT i...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.