首页 > Web开发 > 详细

math.vbs 自然数n的n次方的的和或积的级数

时间:2016-02-08 18:20:31      阅读:160      评论:0      收藏:0      [点我收藏+]
复制代码 代码如下:

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 自然数n的n次方的的和或积的级数

原文:http://www.jb51.net/article/19890.htm

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!