The German mathematician Gottfried Leibniz developed the following method to approximate the value of π:
π = XXXXXXXXXX/3 + 1/5 - 1/7 + . . .)
Write a program that allows the user to specify the number of iterations used in this approximation and that displays the resulting value.
Hint: The program might require both the while loop and if else selection statement.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here