Prime numbers p for which the sum of primes less than or equal to p is prime: Difference between revisions
Content added Content deleted
(Added XPL0 example.) |
m (→{{header|REXX}}: fixed closing tag for <lang>) |
||
Line 105: | Line 105: | ||
#= #+1; @.#= j; sq.#= j*j; !.j= 1 /*bump # of Ps; assign next P; P²; P# */ |
#= #+1; @.#= j; sq.#= j*j; !.j= 1 /*bump # of Ps; assign next P; P²; P# */ |
||
if @.#<hi then sP= sP + @.# /*maybe add this prime to sum─of─primes*/ |
if @.#<hi then sP= sP + @.# /*maybe add this prime to sum─of─primes*/ |
||
end /*j*/; return</lang |
end /*j*/; return</lang> |
||
{{out|output|text= when using the default inputs:}} |
{{out|output|text= when using the default inputs:}} |
||
<pre> |
<pre> |