Pseudo-random numbers/Middle-square method: Difference between revisions
Content added Content deleted
No edit summary |
|||
Line 212: | Line 212: | ||
=={{header|Amazing Hopper}}== |
=={{header|Amazing Hopper}}== |
||
Flavour BASICO |
Flavour BASICO. |
||
Version 1: |
|||
<syntaxhighlight lang="c"> |
<syntaxhighlight lang="c"> |
||
#include <basico.h> |
#include <basico.h> |
||
Line 231: | Line 232: | ||
524817 |
524817 |
||
432883 |
432883 |
||
</pre> |
|||
Version 2: |
|||
<syntaxhighlight lang="c"> |
|||
#include <basico.h> |
|||
algoritmo |
|||
s=675248, i=5 |
|||
iterar grupo( --i, i, #( s = int(s ^2 / 1000 % 1000000) ) \ |
|||
s, NL, imprimir ) |
|||
terminar |
|||
</syntaxhighlight> |
|||
{{out}} |
|||
<pre> |
|||
idem. |
|||
</pre> |
</pre> |
||