math.vbs 自然數(shù)n的n次方的的和或積的級數(shù)
更新時間:2009年09月05日 23:53:44 作者:
通項為自然數(shù)n的n次方的的和或積的級數(shù),求和或積的表達式。
復制代碼 代碼如下:
dim n,m
n=inputbox("input a number:","recursion")
m=factorial ( n )
if n<0 then msgbox "must be input a number bigger 0."
elseif n=0 then msgbox "0"&"!"&"is:"&"0"
elseif n>0 then msgbox n&"is:"&m
rem how to done not input and press sure case.
end if
Function Factorial (N)
If N <= 1 Then Factorial = 1
Else Factorial = Factorial(N - 1)*n^n
End If
End Function
相關文章
math.vbs 自然數(shù)n的n次方的的和或積的級數(shù)
通項為自然數(shù)n的n次方的的和或積的級數(shù),求和或積的表達式。2009-09-09VBS教程:函數(shù)-InputBox 函數(shù)
VBS教程:函數(shù)-InputBox 函數(shù)...2006-11-11