Text1
Text2
Text3
Text10
Text4
Text5
Text6
Text11
Text7
Text8
Text9
Text12
Label1
Label2
Label3
Comman d1
Comman d2
Option Explicit Private Sub Command1_Click() Dim a, b, c, d, e, f, g, h, i, j, k, l, a2, a3, a4, b2, b3, b4, c2, c3, c4, d2, d3, d4, e2, e3, e4, f2, f3, f4, g2, g3, g4, h2, h3, h4, i2, i3, i4, x, y, z As Integer a = Val(Text1.Text) b = Val(Text2.Text) c = Val(Text3.Text) d = Val(Text4.Text) e = Val(Text5.Text) f = Val(Text6.Text) g = Val(Text7.Text) h = Val(Text8.Text) i = Val(Text9.Text) j = Val(Text10.Text) k = Val(Text11.Text) l = Val(Text12.Text)
a2 = 1 / a
b2 = b / a c2 = c / a d2 = -(d / a) e2 = e - ((b * d) / a) f2 = f - ((c * d) / a) g2 = -(g / a) h2 = h - ((b * g) / a) i2 = i - ((g * c) / a) a3 = a2 - ((d2 * b2) / e2) b3 = -(b2 / e2) c3 = c2 - ((f2 * b2) / e2) d3 = d2 / e2 e3 = 1 / e2 f3 = f2 / e2 g3 = g2 - ((h2 * d2) / e2) h3 = -(h2 / e2) i3 = i2 - ((f2 * h2) / e2) a4 = a3 - ((c3 * g3) / i3) b4 = b3 - ((c3 * h3) / i3) c4 = -(c3 / i3) d4 = d3 - ((f3 * g3) / i3) e4 = e3 - ((f3 * h3) / i3) f4 = -(f3 / i3) g4 = g3 / i3 h4 = h3 / i3 i4 = 1 / i3 x = (a4 * j) + (b4 * k) + (c4 * l) y = (d4 * j) + (e4 * k) + (f4 * l)
z = (g4 * j) + (h4 * k) + (i4 * l) Label1.Caption = x Label2.Caption = y Label3.Caption = z
End Sub
Private Sub Command2_Click() End End Sub
Private Sub Form_Load() Text1.Text = "" Text2.Text = "" Text3.Text = "" Text4.Text = "" Text5.Text = "" Text6.Text = "" Text7.Text = "" Text8.Text = "" Text9.Text = "" Text10.Text = "" Text11.Text = "" Text12.Text = "" Label1.Caption = "" Label2.Caption = ""
Label3.Caption = "" Command1.Caption = "COMPUTE" Command2.Caption = "END"
End Sub