Euclid-Mullin sequence: Difference between revisions
Content added Content deleted
Not a robot (talk | contribs) (Add SETL) |
(Added Easylang) |
||
Line 208: | Line 208: | ||
loop |
loop |
||
next i</syntaxhighlight> |
next i</syntaxhighlight> |
||
=={{header|EasyLang}}== |
|||
{{trans|AWK}} |
|||
<syntaxhighlight> |
|||
limit = 8 |
|||
arr[] = [ 2 ] |
|||
write 2 & " " |
|||
for i = 2 to limit |
|||
k = 3 |
|||
repeat |
|||
em = 1 |
|||
for j = 1 to i - 1 |
|||
em = em * arr[j] mod k |
|||
. |
|||
em = (em + 1) mod k |
|||
until em = 0 |
|||
k += 2 |
|||
. |
|||
arr[] &= k |
|||
write k & " " |
|||
. |
|||
</syntaxhighlight> |
|||
=={{header|F_Sharp|F#}}== |
=={{header|F_Sharp|F#}}== |