M = 50000;
rng(11);
approx = 0;
for m = 1:M
	approx = approx + f(rand(1,2));
end
approx = 4*(approx / M);
disp(approx);

function y = f(x)
	if norm(x-[0.5,0.5]) <= 0.5
		y = 1;
	else
		y = 0;
	end
end