Jump to content

Numbers whose binary and ternary digit sums are prime: Difference between revisions

m
(Added Quackery.)
m (→‎{{header|Wren}}: Minor tidy)
Line 1,861:
{{libheader|Wren-math}}
{{libheader|Wren-fmt}}
{{libheader|Wren-seq}}
<syntaxhighlight lang="ecmascript">import "/math" for Int
import "/fmt" for Fmt
import "/seq" for Lst
 
var numbers = []
Line 1,875 ⟶ 1,873:
}
System.print("Numbers < 200 whose binary and ternary digit sums are prime:")
Fmt.tprint("$4d", numbers, 14)
for (chunk in Lst.chunks(numbers, 14)) Fmt.print("$4d", chunk)
System.print("\nFound %(numbers.count) such numbers.")</syntaxhighlight>
 
9,485

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.