- #1
just physics
- 4
- 0
we have to write a code to solve system of equations by writing them in matricies (tridiagonal matrix) form ...
the first step is to enter the coefficients of the variables (r1,r2,r3,...) and then the answers to the equations (b1,b2,b3,...) by using array , and print the equations in the form:
r1X1+r2X2=b1
r1X1+r2X2+r3X3=b2
i made the code and i get the answers but i have to insert a code to check the answers that i get i.e: if x1=1 ,x2=6 ,r1=1,r2=2,b1=13
then the program print
1*1+2*6=13
i can't make this step can any1 help me please :(
the first step is to enter the coefficients of the variables (r1,r2,r3,...) and then the answers to the equations (b1,b2,b3,...) by using array , and print the equations in the form:
r1X1+r2X2=b1
r1X1+r2X2+r3X3=b2
i made the code and i get the answers but i have to insert a code to check the answers that i get i.e: if x1=1 ,x2=6 ,r1=1,r2=2,b1=13
then the program print
1*1+2*6=13
i can't make this step can any1 help me please :(