Sexy primes: Difference between revisions
Content deleted Content added
m Minor edit to C++ code |
→{{header|Wren}}: Now uses 'fmt' module. |
||
Line 2,096:
=={{header|Wren}}==
{{trans|Go}}
{{libheader|fmt}}
<lang ecmascript>var sieve = Fn.new { |limit|▼
<lang ecmascript>import "/fmt" for Fmt
limit = limit + 1
// True denotes composite, false denotes prime.
Line 2,119 ⟶ 2,122:
return c
}
var printHelper = Fn.new { |cat, le, lim, max|
var cle =
var clim =
if (cat != "unsexy primes") cat = "sexy prime " + cat
System.print("Number of %(cat) less than %(clim) = %(cle)")
Line 2,215 ⟶ 2,206:
[999853, 999863, 999883, 999907, 999917, 999931, 999961, 999979, 999983, 1000003]
</pre>
=={{header|zkl}}==
|