home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1986 August / Ahoy_Magazine_86-08_1986_Double_L.d64 / Math Mystery (.txt) < prev    next >
Encoding:
Commodore BASIC  |  1986-01-01  |  374 b   |  21 lines

  1. 1 print"[147]":poke53280,6:poke53281,1:poke646,0
  2. 2 printtab(6)"commodares...math mystery"
  3. 3 rem solution by
  4. 4 rem      scott sprouse
  5. 5 rem
  6. 10 for x=1234567 to 9999999
  7. 15 : tt=x/11
  8. 20 : if tt<>int(tt) then 75
  9. 25 : x$=str$(x)
  10. 30 : for i=3 to 8
  11. 35 :   if mid$(x$,i,1)="0" then 75
  12. 40 : next i
  13. 45 : for i=2 to 7
  14. 50 :   for j=i+1 to 8
  15. 55 :     if mid$(x$,i,1)=mid$(x$,j,1) then 75
  16. 60 :   next j
  17. 65 : next i
  18. 70 : print x
  19. 75 next x
  20. 80 end
  21.