Form1: "Ing Valor en La Posicion "
Form1: "Ing Valor en La Posicion "
Dim x, y As Integer
TextBox1.Text = MAXIT
TextBox2.Text = EPS
TextBox3.Text = M
For x = 1 To 3
For y = 1 To 3
matriz1(x, y) = InputBox("Ing valor en la posicion " & Str(x))
Next
Next
ListBox1.Items.Clear()
For x = 1 To 3
ListBox1.Items.Add(matriz1(x, 1) & " " & matriz1(x, 2) & " " &
matriz1(x, 3))
Next
End Sub
Next
For x = 1 To 3
ListBox2.Items.Add(terminoindependiente(x))
Next
End Sub
Next
For x = 1 To 3
ListBox3.Items.Add(x0(x))
Next
End Sub
Do While I <= 3
suma = matriz1(x, y) - matriz1(x, y)
J = 1
Do While J <= 3
If J = I Then
J = J + 1
Else
suma = suma + A(I, J) * x0(J)
If M = 0 Then
x1(I) = -(b(I) - suma) / A(I, I)
Else
x0(I) = (b(I) - suma) / A(I, I)
End If
I = I + 1
If Math.Abs(x - x0(3)) <= EPS Then
For x = 1 To 3
ListBox4.Items.Add(x1(x))
TextBox4.Text = k
Next
Else
If M = 0 Then
x0(x) = x1(x)
k = k + 1
End If
End If
End If
Loop
Loop
Loop
End Sub
End Class