Concatenate two primes is also prime: Difference between revisions
Content added Content deleted
(Created page with "{{Draft task}} ;Task:Concatenate two primes (p1,p2) is also prime, where '''p1,p2 < 100''' <br><br> =={{header|Ring}}== <lang ring> load "stdlib.ring" see "working..." + nl...") |
|||
Line 22: | Line 22: | ||
p2 = number(ps21) |
p2 = number(ps21) |
||
if isprime(n) and isprime(m) |
if isprime(n) and isprime(m) |
||
if isprime(p1) |
if isprime(p1) |
||
pf = find(prime,p1) |
pf = find(prime,p1) |
||
if pf < 1 |
if pf < 1 |
||
add(prime,p1) |
add(prime,p1) |
||
⚫ | |||
ok |
ok |
||
if isprime(p2) |
|||
pf = find(prime,p2) |
|||
pf |
if pf < 1 |
||
add(prime,p2) |
|||
ok |
|||
ok |
ok |
||
⚫ | |||
ok |
ok |
||
next |
next |