math.vbs 自然数n的n次方的的和或积的级数
math.vbs 自然数n的n次方的的和或积的级数
发布时间:2016-12-28 来源:查字典编辑
摘要:复制代码代码如下:dimn,mn=inputbox("inputanumber:","recursion")m=factorial(n)if...

复制代码 代码如下:

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

推荐文章
猜你喜欢
附近的人在看
推荐阅读
拓展阅读
相关阅读
网友关注
最新vbs学习
热门vbs学习
脚本专栏子分类