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

→‎{{header|Go}}: Added stretch goal.
m (→‎{{header|Perl}}: note use of 'theory' module)
(→‎{{header|Go}}: Added stretch goal.)
Line 42:
}
fmt.Println("\nFound", len(primes), "Such primes.")
pc := len(primes)
for i := 30003; i <= 39993; i += 10 {
if rcu.IsPrime(i) {
pc++
}
}
for i := 300003; i <= 399993; i += 10 {
if rcu.IsPrime(i) {
pc++
}
}
pcc := rcu.Commatize(pc)
fmt.Println("\nFound", pcc, "primes under 1,000,000 which begin and end with 3.")
}</lang>
 
Line 52 ⟶ 65:
 
Found 33 Such primes.
 
Found 2,251 primes under 1,000,000 which begin and end with 3.
</pre>
 
9,490

edits