Data update
This commit is contained in:
parent
52a6ef48dd
commit
157b70a810
604 changed files with 14253 additions and 2100 deletions
|
|
@ -0,0 +1,23 @@
|
|||
BOOL local fn IsPrime( n as long )
|
||||
if ( n == 2 ) then return YES
|
||||
if ( n < 2 || n % 2 == 0 ) then return NO
|
||||
for long i = 3 to sqr(n) step 2
|
||||
if ( ( n % i ) == 0 ) then return NO
|
||||
next i
|
||||
end fn = YES
|
||||
|
||||
void local fn DoIt
|
||||
long count = 0
|
||||
for long i = 42 to LONG_MAX
|
||||
if ( fn IsPrime( i ) )
|
||||
count++
|
||||
print count,i
|
||||
if ( count == 42 ) then break
|
||||
i += i
|
||||
end if
|
||||
next
|
||||
end fn
|
||||
|
||||
fn DoIt
|
||||
|
||||
HandleEvents
|
||||
Loading…
Add table
Add a link
Reference in a new issue