VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   3195
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   3195
   ScaleWidth      =   4680
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command1 
      Caption         =   "Command1"
      Height          =   375
      Left            =   840
      TabIndex        =   0
      Top             =   2760
      Width           =   2055
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
    Dim x0 As Single, x1 As Single
    Dim fx As Single, f1x As Single
    x0 = 3          '迭代初值
    x1 = x0
    Do
      x0 = x1   '为下一次迭代作准备
      fx = 3 * x0 * x0 * x0 - 4 * x0 * x0 _
       - 5 * x0 + 13
      f1x = 9 * x0 * x0 - 8 * x0 - 5
      x1 = x0 - fx / f1x
    Loop While Abs(x1 - x0) > 0.0001
    Print (x1)         ' 显示求得的高次方程根
End Sub


