作者kaohsiungboy (unlearn)
看板NTUEE_Lab207
标题方祥大 这周的作业来了
时间Thu Oct 16 18:30:47 2008
calculate the value of pi from the infinite series
pi= 4(1-1/3+1/5-1/7+1/9-1/11.....)
print a table that shows the value of pi approximated by computing one term
of this series, by two terms, three terms, and so on.
how many terms of this series do you have to use before you first get
3.14?3.141?3.1415?3.14159?
pi = 3.14159265
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.112.20.39