VERSION 5.00
Begin VB.Form frm1 
   BackColor       =   &H00004040&
   Caption         =   "Решение уравнения"
   ClientHeight    =   4395
   ClientLeft      =   2610
   ClientTop       =   2550
   ClientWidth     =   6975
   LinkTopic       =   "Form1"
   ScaleHeight     =   4395
   ScaleWidth      =   6975
   Begin VB.TextBox txtE 
      Alignment       =   1  'Right Justify
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   372
      Left            =   5520
      TabIndex        =   9
      Top             =   1800
      Width           =   972
   End
   Begin VB.TextBox txtX 
      Alignment       =   1  'Right Justify
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   372
      Left            =   5520
      TabIndex        =   5
      Top             =   2520
      Width           =   972
   End
   Begin VB.TextBox txtB 
      Alignment       =   1  'Right Justify
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   372
      Left            =   5520
      TabIndex        =   4
      Top             =   1080
      Width           =   972
   End
   Begin VB.TextBox txtA 
      Alignment       =   1  'Right Justify
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   372
      Left            =   5520
      TabIndex        =   3
      Top             =   360
      Width           =   972
   End
   Begin VB.CommandButton cmdNum 
      Caption         =   "Числовой метод"
      Height          =   492
      Left            =   4800
      TabIndex        =   2
      Top             =   3480
      Width           =   1932
   End
   Begin VB.CommandButton cmd1 
      Caption         =   "График"
      Height          =   495
      Left            =   1920
      TabIndex        =   1
      Top             =   3720
      Width           =   1095
   End
   Begin VB.PictureBox picGraph 
      BackColor       =   &H00FFFFFF&
      DrawWidth       =   2
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   3255
      Left            =   480
      ScaleHeight     =   3195
      ScaleWidth      =   3915
      TabIndex        =   0
      Top             =   240
      Width           =   3972
   End
   Begin VB.Label lblE 
      Alignment       =   1  'Right Justify
      BackColor       =   &H00FFFFFF&
      Caption         =   "E"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   372
      Left            =   4920
      TabIndex        =   10
      Top             =   1800
      Width           =   372
   End
   Begin VB.Label lblX 
      Alignment       =   1  'Right Justify
      BackColor       =   &H00FFFFFF&
      Caption         =   "X"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   372
      Left            =   4920
      TabIndex        =   8
      Top             =   2520
      Width           =   372
   End
   Begin VB.Label lblB 
      Alignment       =   1  'Right Justify
      BackColor       =   &H00FFFFFF&
      Caption         =   "B"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   372
      Left            =   4920
      TabIndex        =   7
      Top             =   1080
      Width           =   372
   End
   Begin VB.Label lblA 
      Alignment       =   1  'Right Justify
      BackColor       =   &H00FFFFFF&
      Caption         =   "A"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   372
      Left            =   4920
      TabIndex        =   6
      Top             =   360
      Width           =   372
   End
End
Attribute VB_Name = "frm1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim sngX As Single
Dim dblA, dblB, dblE, dblC As Double
Private Sub cmd1_Click()
'Задание масштаба
picGraph.Scale (-1.5, 2)-(1.5, -2)
'Построение графика
For sngX = -2 To 2 Step 0.01
picGraph.PSet (sngX, sngX ^ 3 - Sin(sngX))
Next sngX
'Ось Х
picGraph.Line (-1.5, 0)-(1.5, 0)
For bytI = -1.5 To 1.5 Step 0.5
picGraph.PSet (bytI, 0)
picGraph.Print bytI
Next bytI
'Ось Y
picGraph.Line (0, 2)-(0, -2)
For bytI = -2 To 2
picGraph.PSet (0, bytI)
picGraph.Print bytI
Next bytI
End Sub
Private Sub cmdNum_Click()
dblA = Val(txtA.Text)
dblB = Val(txtB.Text)
dblE = Val(txtE.Text)
Do
dblC = (dblA + dblB) / 2
If (dblA ^ 3 - Sin(dblA)) * (dblC ^ 3 - Sin(dblC)) < 0 Then
dblB = dblC
Else
dblA = dblC
End If
Loop While (dblB - dblA) / 2 > dblE
txtX.Text = (dblA + dblB) / 2
End Sub
