【答案】求e的x次幂(VB)Private Sub Button1_Click(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles Button1.ClickDim i,s,d,o As SingleDim ee,temp As Singled = Val(Me.TextBox1.Text)i = 1s = 1ee = 1.0o = dtemp = dDo While temp
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/16 13:55:20
【答案】求e的x次幂(VB)Private Sub Button1_Click(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles Button1.ClickDim i,s,d,o As SingleDim ee,temp As Singled = Val(Me.TextBox1.Text)i = 1s = 1ee = 1.0o = dtemp = dDo While temp
【答案】求e的x次幂(VB)
Private Sub Button1_Click(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles Button1.Click
Dim i,s,d,o As Single
Dim ee,temp As Single
d = Val(Me.TextBox1.Text)
i = 1
s = 1
ee = 1.0
o = d
temp = d
Do While temp > 0.000001
ee += temp
i += 1
s *= i
o *= d
temp = (o * 1.0) / s
Loop
Me.TextBox2.Text = CStr(ee)
End Sub
End Class
用的上的吱一声啊
【答案】求e的x次幂(VB)Private Sub Button1_Click(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles Button1.ClickDim i,s,d,o As SingleDim ee,temp As Singled = Val(Me.TextBox1.Text)i = 1s = 1ee = 1.0o = dtemp = dDo While temp
吱!
TextBox2.Text = Exp(Val(Me.TextBox1.Text))