Deceptive numbers: Difference between revisions

Content added Content deleted
(Added Easylang)
Line 761: Line 761:
=={{header|langur}}==
=={{header|langur}}==
{{trans|ALGOL 68}}
{{trans|ALGOL 68}}
<syntaxhighlight lang="langur">val .isPrime = f .i == 2 or .i > 2 and
<syntaxhighlight lang="langur">val .isPrime = fn(.i) .i == 2 or .i > 2 and
not any f(.x) .i div .x, pseries 2 .. .i ^/ 2
not any fn(.x) .i div .x, pseries 2 .. .i ^/ 2


var .nums = []
var .nums = []
Line 768: Line 768:


for .n = 9; len(.nums) < 10; .n += 2 {
for .n = 9; len(.nums) < 10; .n += 2 {
.repunit = .repunit x 100 + 11
.repunit = .repunit * 100 + 11
if not .isPrime(.n) and .repunit div .n {
if not .isPrime(.n) and .repunit div .n {
.nums = more .nums, .n
.nums = more .nums, .n