hi,

i'm currently working on a program which asks the user to input an integer value of "n" to determine the number of iterations of the denominator in the equation for PI listed below.

I have all the basic input, output, function calls etc; however, i'm a bit confused on how to turn the equation below into a c expression with variable input.

PI = 4(1 + 1/3 - 1/5 + 1/7 etc... (where int n is the value of the denominator to continue to)

PI = 4 + 4/3 - 4/5 + 1/7 (just another way to look at it)

anyone able to help? Thanks a lot!