0

calculate value of PI from the infinite series

π = 4-4/3+4/5-4/7+4/9-4/11 +.....

write a class with two data members aproxivalue(double value ) and percision ( integer value ) where precion is the number of terms of the series used to compute the value of approxivalue :

1- default constructor permits to creats an object with one terms ..

2 the constructor with parameter creats an object with the specific numbers of terms

3- get methods to get the approximate value and the number of terms used ..

4- toString method...

i can not find the general form of this

π = 4-4/3+4/5-4/7+4/9-4/11 +.....