math.vbs 自然数n的n次方的的和或积的级数
2017年03月05日
复制代码 代码如下:
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
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
相关阅读
-
工商银行喜结良缘金条30克价格今天多少一克(2024年05月03日)
-
工商银行筑梦中华金条100克价格今天多少一克(2024年05月03日)
-
2024版熊猫纪念币150克精制金币现在市场价是多少(2024年05月03日)
-
2024版3克熊猫金币价格(2024年05月03日)
-
周生生铂金多少钱一克(2024年05月03日)参考价格
-
北京菜百铂金多少钱一克(2024年05月03日)参考价格
-
北京菜百黄金价格今天多少一克(2024年05月03日)
-
上海老庙铂金多少钱一克(2024年05月03日)参考价格
-
黄金9995价格多少钱一克(2024年05月03日)
-
周大福黄金价格今天多少一克(2024年05月03日)