Prime numbers which contain 123: Difference between revisions
→{{header|ALGOL 68}}: Use ALGOL 68-primes
m (→{{header|Sidef}}: minor fix when `upto` is not a power of `base`) |
(→{{header|ALGOL 68}}: Use ALGOL 68-primes) |
||
Line 10:
=={{header|ALGOL 68}}==
{{libheader|ALGOL 68-primes}}
<lang algol68>BEGIN # find primes whose decimal representation contains 123 #
INT max prime = 1 000 000;
# sieve the primes to max prime #
PR read "primes.incl.a68" PR
# find the appropriate primes #
# as observed by the Wren sample, the primes must have a least 4 digits #
Line 57 ⟶ 53:
Found 451 "123" primes below 1000000
</pre>
=={{header|AWK}}==
<lang AWK>
|