R from Part 27

n = 300000000
x = runif(n)
y = 4/(1+x*x)
print(mean(y))