et0115
訪客
|
The factorial of a positive 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*36*2*1,which is 120. a) Write an application that reads a positive integer from an input dialog and computes and prints its factorial b) Write an application that estimates the value of the mathematical constant e by using the formula e=1+1/1!+1/2!+... c) Write an application that computes the value of -- by using the formula e的X次方=1+x/1!+x的2次/2!+.... 這是題目...應該市說階層的寫法 但是不會寫...拜託大大教一下
|