% = an array containing n successive approx to pi
%   using a dart board
function p= dart(n)
x= rand(1,n);
y= rand(1,n);
d2=   (x .* x) + (y .* y);
in=   d2 <= 1;
hits=  cumsum(in);
p= 4 *(hits ./ (1:n));