Private Function NewTon(n As Double, eps As Double) As Double
Dim a(100) As Double
Dim x As Double
Dim y As Double
Dim k As Double
a(0) = 0
For i = 0 To 99
x = a(i)
y = x ^ 3 - 2 * x ^ 2 + 4 * x + 1
k = 3 * x ^ 2 - 4 * x + 4
a(i + 1) = x - y / k
Print a(i + 1)
If Abs(y) < esp Then
NewTon = a(i + 1)
Exit Function
Else
NewTon = 0
End If
Next i
End Function
esp和 eps 笔误喽
你会了嘛 怎么做的 我看答案还是看不懂那