Special neighbor primes: Difference between revisions

added Arturo
(Dialects of BASIC moved to the BASIC section.)
(added Arturo)
Line 129:
( 73 + 79 ) - 1 = 151
</pre>
 
=={{header|Arturo}}==
<syntaxhighlight lang="arturo">primesBelow100: select 1..100 => prime?
 
loop 1..dec size primesBelow100 'p [
p1: primesBelow100\[p-1]
p2: primesBelow100\[p]
if prime? dec p1 + p2 ->
print ["(" p1 "," p2 ")"]
]</syntaxhighlight>
 
{{out}}
 
<pre>( 3 , 5 )
( 5 , 7 )
( 7 , 11 )
( 11 , 13 )
( 13 , 17 )
( 19 , 23 )
( 29 , 31 )
( 31 , 37 )
( 41 , 43 )
( 43 , 47 )
( 61 , 67 )
( 67 , 71 )
( 73 , 79 )</pre>
 
=={{header|AWK}}==
1,532

edits