This is a problem from my computer science class...

An approximate value of pi can be calculated using the series given below:

pi = 4[ 1 - 1/3 + 1/5 - 1/7 + 1/9 ... + ((-1)^n) / (2n+1) ]
...