math.vbs 自然數(shù)n的n次方的的和或積的級數(shù)
來源:易賢網(wǎng) 閱讀:1916 次 日期:2016-07-18 13:55:44
溫馨提示:易賢網(wǎng)小編為您整理了“math.vbs 自然數(shù)n的n次方的的和或積的級數(shù)”,方便廣大網(wǎng)友查閱!

通項為自然數(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

更多信息請查看腳本欄目
易賢網(wǎng)手機網(wǎng)站地址:math.vbs 自然數(shù)n的n次方的的和或積的級數(shù)
關(guān)于我們 | 聯(lián)系我們 | 人才招聘 | 網(wǎng)站聲明 | 網(wǎng)站幫助 | 非正式的簡要咨詢 | 簡要咨詢須知 | 新媒體/短視頻平臺 | 手機站點

版權(quán)所有:易賢網(wǎng)