Private Sub cmdBack_Click() '
' cmdBack_Click(),
'
' cmdBack
frmMain.Show ' frmMain
Unload Me '
End Sub '
' cmdBack_Click()
Private Sub cmdEnd_Click() '
' cmdEnd_Click(),
'
' cmdEnd
End '
End Sub ' cmdEnd_Click()
Private Sub cmdRandomaze_Click() '
' cmdRandomaze_Click(),
'
' cmdRandomaze
Call Vvod ' ( )
' Vvod
Call Form_Load ' ( )
' Form_Load
End Sub '
' cmdRandomaze_Click()
Private Sub Form_Load() '
' Form_Load(),
' frmRezalt
grdMas.Cols = 3 '
' MSFlexGrid
grdMas.Rows = N + 1 '
' MSFlexGrid
grdMas.FixedCols = 0 '
' ()
' MSFlexGrid
grdMas.FixedRows = 1 '
' ()
' MSFlexGrid
grdMas.TextMatrix(0, 0) = "" ' (0;0)
'
grdMas.TextMatrix(0, 1) = "X" ' (0;1)
'
grdMas.TextMatrix(0, 2) = "Y" ' (0;2)
' Y
For k = 1 To N '
'
grdMas.TextMatrix(k, 0) = k ' (k;0)
'
grdMas.TextMatrix(k, 1) = X(k) ' (k;1)
'
'
grdMas.TextMatrix(k, 2) = Y(k) ' (k;2)
'
' Y
S = S + 2 / (X(k) + Y(k)) '
'
Next '
lblSum.Caption = " S=" + Str(S) '
' Label (lblSum)
End Sub ' Form_Load
1. .
2. Visual Basic.
3. , .
4. .
5. - .
1. Y(10 + n). :
.
2. :
,
i - (12 + n).
3. : 1, 2,..., 30.
|
|
4. : 1, 2,..., 25.
5. (6 + n) X (6 + n).
6. 15- a, b, c :
.
7. : 1, 2,..., 20.
8. 1, 2,..., 30 .
9. 1, 2,..., 25, .
10. 1, 2,..., 30 .
11. (19 + n), 0< A i < 9.
12. 1, 2,..., 30 .
13. (30) Y.
14. 3 X (5 + n).
15. Z (19) .
16. (13,10) .
17. 1, 2,..., 30 .
18. V (12 + n, 9 + n) .
19. K (19 + n).
20. Y Z (20 + n).
21. 5 (5 + n).
22. 4 (5 + n).
23. ( = 1,53), A i :
.
24. 5 X 10. .
25. 25. , 11 - 15- 24- . .
26. 1, 2,..., 25, .
27. 15- a, b, c :
.
28. 5 X 5. . .
29. V (10 + n, 9 + n) .
30. (10, 10) .
6
. Visual Basic
1. .
2. Visual Basic .
3. .
4. .
5. .
6. (OptionButton).
|
|
7. (Frame).
8. Visual Basic.
1. .
2. Visual Basic.
3. , , .
4. .
5. - .
. f(x)=0. f(x) [a,b], f(a)f(b)<0, .. - ( f(a) f(b) ). f(x) x - . [a,b] . f ((a + b)/2) = 0, x = (a + b) /2 . f ((a + b)/2) < > 0, [ a,(a+b)/2 (a+b)/2, b ], , (, ). [ a,b ] , , [ a,b ], f(x) .. , , , , : | ab | < ε , , , [a,b] ( ).
(). , [a,b], ( ) f(x) = 0 f(x), .., f '(x) f "(x) ( ).
. [a,b] .
f(x 0 ) f'(x 0 ).
, :
, .. :
( ). : x = (x), . , , , , .
: x 2 - sin x+ 2 x= 0 , .. : x = 0,5sin x -0,5 x 2.
. [ ,b ]. , 1, .. |j(x)| < 1.
j(x) = 0,5cos x - x, [0,1] . , ( x), () x 0. x 1, x 2,... x x 0, x 1, x 2 ..:
x 1 = j(x 0)
x 2 = j(x 1)
................
xn = j(xn -1)
.
|
|
. , | xn +1 - xn | ε, .
, , , , .. , .
:
Private Sub cmdEnd_Click()
End
End Sub
Private Sub cmdStart_Click()
Call mnuPusk_Click
End Sub
Private Sub Form_Load()
If opt1(0).Value = True Then E = 0.001
If opt1(1).Value = True Then E = 0.0001
If opt1(2).Value = True Then E = 0.00001
If opt1(3).Value = True Then E = 0.000001
End Sub
Private Sub mnuDiscr_Click()
Load frmDisk
frmDisk.Show
End Sub
Private Sub mnuExit_Click()
End
End Sub
Private Sub mnuIter_Click()
mnuPolovin_delen.Checked = False
mnuNutona.Checked = False
mnuIter.Checked = True
End Sub
Private Sub mnuNutona_Click()
mnuPolovin_delen.Checked = False
mnuNutona.Checked = True
mnuIter.Checked = False
End Sub
Private Sub mnuPolovin_delen_Click()
mnuPolovin_delen.Checked = True
mnuNutona.Checked = False
mnuIter.Checked = False
End Sub
Private Sub mnuPusk_Click()
Call Form_Load
If mnuPolovin_delen.Checked = True Then
txtRez.Text = " "
ElseIf mnuNutona.Checked = True Then
txtRez.Text = " "
ElseIf mnuIter.Checked = True Then
X = 0.2
M1: Xn = F(X)
If Abs(X - Xn) >= E Then X = Xn: GoTo M1
txtRez.Text = " =" + Str(X)
End If
End Sub
Private Function F(X) As Single
F = 0.2 + Sin(X + 1)
End Function
Private Sub nmuAbout_Click()
Load frmAbout
frmAbout.Show
End Sub
1. .
2. Visual Basic.
3. .
4. .
5. - .
ε = 1×10-6 | ||
: 2 x - ln(x + 3) = 0 | ||
: , = 1000 | ||
: [-1,1] | ||
ε = 1×10-6 | ||
: [1,2] | ||
: | ||
[0,1]: | ||
= 999 : | ||
: , = n + 1 | ||
: | ||
: [2;3], | ||
[0;2] : , | ||
[0;1] : | ||
[0;1,5] : | ||
: | ||
[-1;0] : | ||
[0;p/4] : | ||
: | ||
: | ||
[0;p/2] : | ||
: | ||
[-1;1]: | ||
: | ||
: , = 13 | ||
: , | ||
ε = 1×10-6 | ||
[0;1]: | ||
: [1;1,9] | ||
: | ||
[0;p/2] : | ||
[0;1] : | ||
[0;1,5] : |
|
|