Neighbour primes: Difference between revisions

Line 1,126:
 
=={{header|Prolog}}==
for swi prolog (© 2024)
<syntaxhighlight lang="prolog">
primes(2, Limit):- 2 =< Limit.
Line 1,154 ⟶ 1,155:
showList(P1P2List).
</syntaxhighlight>
{{out}}
<pre>
?- do.
(3,5) (5,7) (7,11) (13,17) (19,23) (67,71) (149,151) (179,181) (229,233) (239,241)
(241,251) (269,271) (277,281) (307,311) (313,317) (397,401) (401,409) (419,421) (439,443) (487,491)
true.
</pre>
 
=={{header|Python}}==
<syntaxhighlight lang="python">#!/usr/bin/python
64

edits