Skip to content

Instantly share code, notes, and snippets.

@Prunus1350
Created January 4, 2015 10:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Prunus1350/3e4634dc231982c8d69b to your computer and use it in GitHub Desktop.
Save Prunus1350/3e4634dc231982c8d69b to your computer and use it in GitHub Desktop.
円周率を求める
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