A Program To Solve Simultaneous Equation

Private Sub Command1_Click()
Dim a As Double
Dim b As Double
Dim c As Double
Dim d As Double
Dim z As Double
Dim f As Double
Dim g As Double
Dim h As Double
Dim i As Double
Dim x As Double
Dim y As Double
a = InputBox("a""Input a")
b = InputBox("b""input b")
c = InputBox("c""input c")
d = InputBox("a2""input a2")
z = InputBox("b2""input b2")
f = InputBox("c2""input c2")
g = (c - a * x) / b
h = (f - z * c / b) / ((b * d - z * a) / b)
i = (c - a * h) / b
Print "x=" & h
Print "y=" & i
End Sub

After that, you run the program and input the values one after the other.
a and a2 have the same unknown, b and b2 also have the same unknown. c and c2 are the standalone numbers.
As stated in the quadratic solving code, there is a lot of maths solving behind this code. Goodluck solving this one.
Confused? Use the comment box.

Comments