Primality by Wilson's theorem: Difference between revisions

Added Easylang
(Add Scala implementation)
(Added Easylang)
Line 1,089:
{{out}}
<pre>2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97</pre>
=={{header|EasyLang}}==
{{trans|BASIC256}}
<syntaxhighlight>
func wilson_prime n .
fct = 1
for i = 2 to n - 1
fct = fct * i mod n
.
return if fct = n - 1
.
for i = 2 to 100
if wilson_prime i = 1
write i & " "
.
.
</syntaxhighlight>
 
{{out}}
<pre>
2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97
</pre>
 
=={{header|EDSAC order code}}==
{{trans|Pascal}}
2,016

edits