math.vbs 自然数n的n次方的的和或积的级数
来源:本站原创|时间:2022-11-25|栏目:vb|
复制代码 代码如下:
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
您可能感兴趣的文章
- 01-10下载文件到本地运行的vbs
- 01-10什么是一个高效的软件
- 01-10VBS中的正则表达式的用法大全 <font color=red>原创&
- 01-10VBS中SendKeys的基本应用
- 01-10VBS中Select CASE的其它用法
- 01-10VBScript的入门学习资料
- 01-10VBScript教程 第十二课VBScript页面的简单样例
- 01-10VBS教程:正则表达式简介
- 01-10VBS教程:方法-Copy 方法
- 01-10VBS教程:方法-Move 方法