作者cocoyan (錐子)
看板NTUBSE-B-96
標題Re: [問題] 計程作業~~
時間Thu Mar 13 00:22:28 2008
※ 引述《v900149 (簡諧運動的失衡萊伯拉)》之銘言:
: 如題
: 這是在問計程的習題
: 別告訴我是3-43
: 因為中文版跟英文版的題目不大一樣..= =||
: (版本不同!?)
: 所以要問問題目的內容~~~
: 今後的作業可能都要麻煩用英文版的大大PO一下題目了~~~
: 恩 就是這樣了....謝謝各位的幫忙...
: (該不會又是摳摳驗來貼吧? 真不愧是C哥...)
: cocoyan!! 以後出完作業之後自己自動地貼一下題目吧!!
: 多謝~~~
The factorial of a nonnegative integer n is written n!
(pronounced "n factorial") and is defined as follows:
n!=n*(n-1)*(n-2)*...*1(for values of n greater than or equal to 1)
and
n!=1 (for n=0).
For example,5!=5*4*3*2*1,which is 120.
a) Write a program that reads a nonnegative integer and computes and
prints its factorial.
b) Write a program that estimates the value of the mathematical constant
e by using the formula:
e=1+1/1!+1/2!+1/3!+...
c) Write a program that computes the value of e^x by using the formula
e^x=1+x/1!+x^2/2!+x^3/3!+...
--
如果我們具有磁場,
則當我們每次經過電冰箱門的時候,
我們都可能會與冰箱門撞在一起,
所以人的身體不具有磁場是有其優點的。
節錄自Fundamentals of Physics 7ed by Halliday&Resnick&Jearl Walker
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.112.242.26
→ v900149:果然是摳摳驗....真牛逼啊!! 03/13 00:23
→ cocoyan:還好啦! 03/13 00:25