, , , .
, , . . , .
x1 . , 3:
:
.
x2 . x1. , x2. , 2. :
. , . I II , , .
,
, (-7).
, :
:
. x1=5;x2=3.
Visual Basic
Visual Basic Microsoft Windows. Windows, Visual Basic .
Visual Basic? "Visual" , , , GUI. "Basic" BASIC (Beginners All-Purpose Symbolic Instruction Code ) , , . .
Form . , , , , Code . , , " ". " ", . , . - .
(. ). , , . , , . , , .
|
|
, . , , . , , . . ! .
Basic'e Sub, (). End Sub (. subroutine: ). , . , , .
- : , , . Sub, , () End Sub Basic'.
Form_Load
Form_Load , . - ( Print), .. . - !
Click
Click , . , , , Click . - Form_Click, .
DblClick
- . : Click, .
Name
. , Basic-. design . - , , "Form1" . - , , , .
Caption
, , "" . , . . , . design, .
Visible
, ( ""). , , , design, . True False.
Enabled
. . . , "". , Visible True False
|
|
Left, Top
. . , "" , .. , . design . , .
Width, Height
. design, . .
(button) : - , , , "OK" "", .
: , . , - - , Timer'a. , .. Windows'e 16 .
, , . , , , . (, Label) , , .
, , .bmp .ico . . , . Click, , .
:
:
, .
:
Microsoft Visual Studio 2010
:
Windows Xp, Windows Vista, Windows 7
:
Visual Basic 2010.
:
, .
2 , , .
:
:
. , .
:
:
. 2 Y. 4 , X Y. 2 .
.
. 4 . , .
, .
.
:
.
:
: 2;
: Intel Pentium 4, 3.00 ;
: 32 ;
:
Visual Studio 2010.
, SLAU, SLAU.vbproj. , .
|
|
:
, , x. , .
:
, . 2 , , .
2 x1 x2, . , .
.
1. .
:
2.
.
3. .
, . , Visual Basic 2010. Visual Basic , Visual Basic, .
, :
; ; - .
Visual Basic, , .
http://ru.wikipedia.org
http://mathprofi.ru/kak_reshit_sistemu_uravnenii.html
http://mathprofi.ru/metod_gaussa_dlya_chainikov.html
http://www.webmath.ru/poleznoe/formules_5_5.php
http://gauss.h1.ru/
http://msdn.microsoft.com/ru-ru/library/dd831853.aspx
http://gospodaretsva.com/urok-26-postroenie-grafika-funkcii.html
http://www.rugost.com/index.php?option=com_content&view=article&id=58:19402-78&catid=19&Itemid=50
Public Class Form1
Dim Graph1 As Graphics
Dim Pen1 As New Pen(Color.Black, 2)
Dim Pen2 As New Pen(Color.Black, 1)
Dim brush1 As New SolidBrush(Color.Black)
Dim font1 As New Font("times new roman", 7)
Dim X, Y, a1, a2, b1, b2, c1, c2, k1, k2, m1, m2, d, z1, z2, x1, y1 As Single
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Label1.Text = " "
Label2.Text = "X1+"
Label3.Text = "X2="
Label4.Text = "X1+"
Label5.Text = "X2="
Label6.Text = ""
Label7.Text = ""
Label8.Text = ""
Button1.Text = " "
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Graph1 = Me.PictureBox1.CreateGraphics()
For X = -15 To 15 Step 3
Graph1.DrawString(X, font1, brush1, X * 10 + 150, 150)
Next X
For Y = -15 To 150 Step 3
Graph1.DrawString(Y, font1, brush1, 150, 150 - Y * 10)
|
|
Next Y
Graph1.ScaleTransform(1, -1)
Graph1.TranslateTransform(150, -150)
Graph1.DrawLine(Pen1, -150, 0, 150, 0)
Graph1.DrawLine(Pen1, 0, -150, 0, 150)
For X = -150 To 150 Step 30
Graph1.DrawLine(Pen2, X, -3, X, 3)
Next X
For Y = -150 To 150 Step 30
Graph1.DrawLine(Pen2, -3, Y, 3, Y)
Next Y
a1 = TextBox1.Text
b1 = TextBox2.Text
c1 = TextBox5.Text
a2 = TextBox3.Text
b2 = TextBox4.Text
c2 = TextBox6.Text
k1 = (-1) * (a1 / b1)
m1 = (-1) * (c1 / b1)
k2 = (-1) * (a2 / b2)
m2 = (-1) * (c2 / b2)
d = -(a2 / a1)
a2 = a2 + (a1 * d)
b2 = b2 + (b1 * d)
c2 = c2 + (c1 * d)
z2 = c2 / b2
z1 = (c1 - (z2 * b1)) / a1
Label6.Text = "X1=" + z1.ToString
Label7.Text = "X2=" + z2.ToString
Label8.Text = " :"
For X = -150 To 150 Step 1
Y = k1 * X + m1
y1 = k1 * (X + 1) + m1
Graph1.DrawLine(Pen2, X * 10, Y * 10, (X + 1) * 10, y1 * 10)
Next X
For X = -150 To 150 Step 1
Y = k2 * X + m2
y1 = k2 * (X + 1) + m2
Graph1.DrawLine(Pen2, X * 10, Y * 10, (X + 1) * 10, y1 * 10)
Next X
End Sub
End Class