Pseudo-random numbers/Middle-square method: Difference between revisions
Pseudo-random numbers/Middle-square method (view source)
Revision as of 02:44, 14 October 2023
, 7 months ago→{{header|Amazing Hopper}}
No edit summary |
|||
Line 212:
=={{header|Amazing Hopper}}==
Flavour BASICO
Version 1:
<syntaxhighlight lang="c">
#include <basico.h>
Line 231 ⟶ 232:
524817
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>
|