Private Sub Command2_Click()
Dim e As Single, k As Single, y2 As Single, y As Single, a As Single
yd = 0.8386
xd = 0.8386
For i = 0.8382 To 0 Step -0.01
x = i
If x <= 0.3 Then
a = 1.1213 * (x + 0.2) ^ (-1.5235)
Else
a = 0.8938 * x ^ (-1.0632)
End If
Next i
y = a * x / (1 + (a - 1) * x)
While e >= 10 ^ (-4)
k = (yd - y) / (xd - x)
y2 = (x * (1 + (a - 1) * x) - a * x * (a - 1)) / (1 + (a - 1) * x) ^ 2
e = Abs(k - y2)
Wend
Print "x="; x, "y="; y
End Sub
帮我看看哪里错了!谢谢