Program to calculate pi to n places