欧美一区二区三区,国内熟女精品熟女A片视频小说,日本av网,小鲜肉男男GAY做受XXX网站

vb中1到n的階乘之和公式

林國瑞2年前18瀏覽0評論

vb中1到n的階乘之和公式?

在窗體上放一個命令按紐,計算結果將在窗體上輸出,代碼如下(直接拷貝)

Private Sub Command1_Click()

Dim a As Integer, b As Integer, c As Integer

a = 2

b = 4

c = 6

nn a, b, c

End Sub

Sub nn(a As Integer, b As Integer, c As Integer)

Dim i As Integer, j As Integer, k As Integer, s1 As Integer, s2 As Integer, s3 As Integer

s1 = 1

s2 = 1

s3 = 1

For i = 1 To a

s1 = s1 * i

Next i

For j = 1 To b

s2 = s2 * j

Next j

For k = 1 To c

s3 = s3 * k

Next k

Print "2!+4!+6!=" & s1 + s2 + s3

End Sub

n的階乘編程 java,vb中1到n的階乘之和公式