The question is :

Write a program that approximates the value of π using the Leibniz series and compares

the Leibniz series approximation against the known value of π and two other common

approximations of π (22/7 and 355/113). The program must prompt the user for the desired

number of terms (n) to use in the approximation (as an integer) and calculate the approximate

value of π to the given number of terms. The program must display each approximation of π and

display the difference between each approximation.

I understand how to prompt for the number, what I don't even get how to start is to use it to approximate the value of pie in that given number. Also how to tell the difference between each approximation

## 1 Replies - 2352 Views - Last Post: 01 October 2014 - 11:58 AM

### #1

# Approximating the value of pi using the Leibniz series

Posted 01 October 2014 - 11:43 AM

##
**Replies To:** Approximating the value of pi using the Leibniz series

### #2

## Re: Approximating the value of pi using the Leibniz series

Posted 01 October 2014 - 11:58 AM

You get the value of n and plug it into the series

wikipedia

..subtract them.

That's what Leibniz formula does, so this statement puzzles me

wikipedia

Quote

Also how to tell the difference between each approximation

..subtract them.

Quote

what I don't even get how to start is to use it to approximate the value of pie in that given number.

That's what Leibniz formula does, so this statement puzzles me

This post has been edited by **andrewsw**: 01 October 2014 - 12:33 PM

Page 1 of 1