Goldman Sachs Interview Question

How to calculate PI if you have a function which return random value on [0,1]