First 9 prime Fibonacci number: Difference between revisions
Content added Content deleted
m (→{{header|Wren}}: Changed to Wren S/H) |
(Added Easylang) |
||
Line 859: | Line 859: | ||
28657 |
28657 |
||
514229</pre> |
514229</pre> |
||
=={{header|EasyLang}}== |
|||
<syntaxhighlight> |
|||
fastfunc isprim num . |
|||
i = 2 |
|||
while i <= sqrt num |
|||
if num mod i = 0 |
|||
return 0 |
|||
. |
|||
i += 1 |
|||
. |
|||
return 1 |
|||
. |
|||
prev = 1 |
|||
val = 1 |
|||
while cnt < 9 |
|||
h = prev + val |
|||
prev = val |
|||
val = h |
|||
if isprim val = 1 |
|||
write val & " " |
|||
cnt += 1 |
|||
. |
|||
. |
|||
</syntaxhighlight> |
|||
{{out}} |
|||
<pre> |
|||
2 3 5 13 89 233 1597 28657 514229 |
|||
</pre> |
|||
=={{header|F_Sharp|F#}}== |
=={{header|F_Sharp|F#}}== |