作者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