Untouchable numbers: Difference between revisions
→{{header|Go}}: Reverted to a limit of 100,000 as 1 million figure was miles out!
(→{{header|Go}}: Reverted to a limit of 100,000 as 1 million figure was miles out!) |
|||
Line 63:
=={{header|Go}}==
{{trans|Wren}}
<lang go>package main
Line 139 ⟶ 137:
func main() {
limit :=
s := sieve(
untouchable := []int{2, 5}
for n := 6; n <= limit; n += 2 {
Line 156 ⟶ 154:
count++
}
fmt.Printf("\n\n%
p := 10
count = 0
Line 164 ⟶ 162:
cc := commatize(count - 1)
cp := commatize(p)
fmt.Printf("%
p = p * 10
if p == limit {
Line 173 ⟶ 171:
cu := commatize(len(untouchable))
cl := commatize(limit)
fmt.Printf("%
}</lang>
Line 200 ⟶ 198:
1,958 1,960 1,962 1,972 1,986 1,992
</pre>
|