Monte Carlo methods: Difference between revisions

m
Line 1,023:
=={{header|EasyLang}}==
<syntaxhighlight lang="text">
procfunc mc n . .
for i = 1 to n
x = randomf
Line 1,031:
.
.
printreturn 4.0 * hit / n
.
numfmt 4 0
callprint mc 10000
callprint mc 100000
callprint mc 1000000
callprint mc 10000000
</syntaxhighlight>
Output:
1,995

edits