VB语言题目:计算y=2/3!+5/6!+8/9!
来源:学生作业帮 编辑:神马作文网作业帮 分类:综合作业 时间:2024/11/15 14:17:53
VB语言题目:计算y=2/3!+5/6!+8/9!
Private Sub Command1_Click()
Dim I As Integer, N As Double
N = 0
For I = 2 To 8 Step 3
N = N + I / (Factorial(I + 1))
Next
Print N
End Sub
Function Factorial(X As Double) As Double
If X = 1 Then
Factorial = 1
Else
Factorial = X * Factorial(X - 1)
End If
End Function
Dim I As Integer, N As Double
N = 0
For I = 2 To 8 Step 3
N = N + I / (Factorial(I + 1))
Next
Print N
End Sub
Function Factorial(X As Double) As Double
If X = 1 Then
Factorial = 1
Else
Factorial = X * Factorial(X - 1)
End If
End Function
VB语言题目:计算y=2/3!+5/6!+8/9!
VB中计算c = 5 (x-32) / 9 用VB语言怎么写
用vb语言编写以下题目:1、建立一个窗体程序用于计算数学函数:Y=a*X^3+b*X^2+c*X
一道vb的题目.x=3:y=5:z=9
在VB语言中,表达式 8\3*61 Mod 5
会VB语言的进!计算1/1!+1/3!+1/5!+.+1/99!
VB语言中计算lg(2)怎么写?
用vb语言计算1!+2!+3!+…+10!,其中阶乘的计算分别用过程和函数实现.
Y=1/2!+1/3!+1/4!+...+1/n!VB编程当通项小于10^(-7)停止计算
VB怎样计算题目求计算
VB程序设计题目:求方程9X—9Y=1,在|X|
C语言中这个式子x=(y*5,y=y+6,y/z,y+=2+(z-=1));到底是怎么计算的?