Hello All,
i'm currently working on a program wich asks the user to input an integer value of "n" to determine what value of the denominator in an equation for PI to work to.
this is written in c, and I have all the basic input, output, function calls etc; however, i'm relatively new to c and 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)
anyone able to help? Thanks a lot!
i'm currently working on a program wich asks the user to input an integer value of "n" to determine what value of the denominator in an equation for PI to work to.
this is written in c, and I have all the basic input, output, function calls etc; however, i'm relatively new to c and 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)
anyone able to help? Thanks a lot!
Comment