Monte Carlo methods: Difference between revisions
m
→{{header|Julia}}
(Add Jsish) |
|||
Line 1,354:
=={{header|Julia}}==
<lang julia>using Printf
s = count(rand() ^ 2 + rand() ^ 2 < 1 for _ in 1:n)
return 4s / n
|