Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
13
Task/Attractive-numbers/BASIC/attractive-numbers.basic
Normal file
13
Task/Attractive-numbers/BASIC/attractive-numbers.basic
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
10 DEFINT A-Z
|
||||
20 M=120
|
||||
30 DIM C(M): C(0)=-1: C(1)=-1
|
||||
40 FOR I=2 TO SQR(M)
|
||||
50 IF NOT C(I) THEN FOR J=I+I TO M STEP I: C(J)=-1: NEXT
|
||||
60 NEXT
|
||||
70 FOR I=2 TO M
|
||||
80 N=I: C=0
|
||||
90 FOR J=2 TO M
|
||||
100 IF NOT C(J) THEN IF N MOD J=0 THEN N=N\J: C=C+1: GOTO 100
|
||||
110 NEXT
|
||||
120 IF NOT C(C) THEN PRINT I,
|
||||
130 NEXT
|
||||
Loading…
Add table
Add a link
Reference in a new issue