Created
January 4, 2015 10:34
-
-
Save Prunus1350/3e4634dc231982c8d69b to your computer and use it in GitHub Desktop.
円周率を求める
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data _null_; | |
do i = 1 to 100000000; | |
x = rand("uniform"); | |
y = rand("uniform"); | |
if x ** 2 + y ** 2 <= 1 then cnt + 1; | |
end; | |
pi = cnt * 4 / 100000000; | |
put pi = ; | |
run; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment