求2!+4!+6!+8!+10!的值用VB 程序怎样编写啊?
来源:百度知道 编辑:UC知道 时间:2024/06/09 03:45:38
这是计算它们的阶乘,希望可以简单一点点答案,但希望可以是清晰的代码.
Private Sub Form_click()
s = 0
For a = 2 To 10 Step 2
c = 1
For b = 1 To a
c = c * b
Next b
s = s + c
Next a
Print s
End Sub
Private Sub Command1_Click()
Sum = 0
For i = 2 To 10 Step 2
Sum = Sum + Jiecheng(i)
Next i
Print Sum
End Sub
Private Function Jiecheng(ByVal n As Integer) As Double
Jiecheng = 1
For i = 1 To n
Jiecheng = Jiecheng * i
Next i
End Function
Private Sub Command1_Click()
he = 1
For a = 1 To 10
he = he * a
If a = 2 Then he1 = he
If a = 4 Then he2 = he
If a = 6 Then he3 = he
If a = 8 Then he4 = he
Next a
he = he + he1 + he2 + he3 + he4
Print he
End Sub
Private Sub Command1_Click()
Dim i, j As Integer
Dim x, y As Variant
For i = 2 To 10 Step 2
x = 1
For j = 1 To i
x = x * j
Next
y = y + x
Next
Print y
E
求1!+2!+3!+4!+5!+6!+7!+8!+9!+10!的值,用C语言编写程序!求代码!
求1!+2!+3!+4!+5!+6!+7!+8!+9!+10!的值,用VB编写程序!求代码!
求用vf作2*4*6*~10的值
求1 2 3 4 5 6 7 8 9 10的方差
如何求一组数的最小公倍数,如[2,3,4,5,6,7,8,9,10]
用java语句求1+2+3+4+5+6+7+8+9+10
利用3,4,6,10求24
求数列 1,2+3,4+5+6,7+8+9+10,……的通项an
各位大哥哥,大姐姐,小妹求一道题。2x3-x=2,求8x4+6x3-4x2+11x+2000的值
急求高分求悬赏极品飞车8、9、10