Pseudo-random numbers/Middle-square method: Difference between revisions
Pseudo-random numbers/Middle-square method (view source)
Revision as of 06:28, 12 January 2023
, 1 year agoAdded 11l
Jazzedpineda (talk | contribs) (Replace Wikipedia link with template) |
Alextretyak (talk | contribs) (Added 11l) |
||
Line 30:
* Show your output here, on this page.
=={{header|11l}}==
{{trans|Python}}
<syntaxhighlight lang="11l">
F random()
V :seed = 675248
:seed = Int(String(Int64(:seed) ^ 2).zfill(12)[3.<9])
R :seed
L 5
print(random())
</syntaxhighlight>
{{out}}
<pre>
959861
333139
981593
524817
432883
</pre>
=={{header|AArch64 Assembly}}==
Line 122 ⟶ 144:
432883
</pre>
=={{header|Ada}}==
<syntaxhighlight lang="ada">with Ada.Text_IO; use Ada.Text_IO;
|