clear; clc;

N = 1e8;
x = rand(1, N);
y = rand(1, N);
m = sum(x .^ 2 + y .^ 2 < 1);
4 * m / N