Primes whose first and last number is 3: Difference between revisions

→‎More general: Fixed minor bug.
m (→‎{{header|REXX}}: changed "ending" to "trailing" (decimal digit).)
(→‎More general: Fixed minor bug.)
Line 249:
for (x in [1, 2, 3, 5, 7, 9]) { // begins and ends with 'x'
var primes = getQualifyingPrimes.call(x, d)
var len = d + ((d-1)/3).floor
Fmt.print("Primes under $,%(len)d which begin and end in $d:", 10.pow(d), x)
for (chunk in Lst.chunks(primes, 10)) Fmt.print("$,%(len)d", chunk)
9,482

edits