Pseudo-random numbers/Middle-square method: Difference between revisions
Content added Content deleted
(→J: shorter and faster) |
No edit summary |
||
Line 210: | Line 210: | ||
{{output}} |
{{output}} |
||
<syntaxhighlight lang="applescript">{959861, 333139, 981593, 524817, 432883}</syntaxhighlight> |
<syntaxhighlight lang="applescript">{959861, 333139, 981593, 524817, 432883}</syntaxhighlight> |
||
=={{header|Amazing Hopper}}== |
|||
Flavour BASICO: |
|||
<syntaxhighlight lang="c"> |
|||
#include <basico.h> |
|||
algoritmo |
|||
s=675248, i=4 |
|||
iterar |
|||
#( s = int(s ^2 / 1000 % 1000000) ) |
|||
s, NL, imprimir |
|||
mientras ' i-- ' |
|||
terminar |
|||
</syntaxhighlight> |
|||
{{out}} |
|||
<pre> |
|||
959861 |
|||
333139 |
|||
981593 |
|||
524817 |
|||
432883 |
|||
</pre> |
|||
=={{header|ARM Assembly}}== |
=={{header|ARM Assembly}}== |