Simultaneous equations are equations that involves two or more unknown variables. There must be as many equations as the number of unknown variables in order for us to solve the problem. In this example, we shall only solve linear simultaneous equations. Linear simultaneous equations take the following forms:

ax+by=m

cx+dy=n

There are two ways to solve simultaneous equations, substitution or elimination. In this program, we use the substitution method. Reorganizing the equations derived the following formulas:

x = (b * n - d * m) / (b * c - a * d)

y = (a * n - c * m) / (a * d - b * c)

To limit the answers to two decimal
places, we use the **round** function. The interface is shown in the Figure below: