The German mathematician Gottfried Leibniz developed the following method to approximate the value of pi: pi/4 = 1- 1/3 + 1/5 - 1/7 + 1/9 - 1/11 ...
Write a program that allows the user to specify the number of iterations used in this approximation and that displays the resulting value for pi.