![]() |
Pi series problem
hey, I got this code, but my brother needs it in terms of printf,scanf,if,for,while u know, and i uses cin,cot and those stuff... i don't remember how to write in the terms he want.. somebody can help us :(
this is his hw: Calculate the value of pie from teh infinite series pie = 4 - 4/3 + 4/5 - 4/7 + 4/9 - 4/11 +... Print a table that shows the value of pie approximated y 1 term of this series, by two terms, by three terms etc. How many terms of this series do you hve to use before you first get 3.14? 3.141? 3.1415? thanks! Code:
#include <iostream> |
Re: Pi series problem
try this
Code:
#include <stdio.h> |
Re: Pi series problem
wow thank you so much!!! perfect!
|
| All times are GMT +5.5. The time now is 09:58. |