Sum of square and cube digits of an integer are primes: Difference between revisions

Added Go
(added AWK)
(Added Go)
Line 317:
next n</lang>
{{out}}<pre>16 17 25 28 34 37 47 52 64</pre>
 
=={{header|Go}}==
{{libheader|Go-rcu}}
<lang go>package main
 
import (
"fmt"
"rcu"
)
 
func main() {
for i := 1; i < 100; i++ {
if !rcu.IsPrime(rcu.DigitSum(i*i, 10)) {
continue
}
if rcu.IsPrime(rcu.DigitSum(i*i*i, 10)) {
fmt.Printf("%d ", i)
}
}
fmt.Println()
}</lang>
 
{{out}}
<pre>
16 17 25 28 34 37 47 52 64
</pre>
 
=={{header|Haskell}}==
9,482

edits