please help me with this one

how do i make a program to solve this linear equations in codeblox?

ax+b=0

1.*********2. ******* 3.
a=3 ****** a=0 ****** a=0
b=-21***** b=-21**** b=0
here x **** here x **** here x
needs to ***cant be *** has infinite
be 7******* found ****** solutions


Last edited on
how do you solve it on paper?
what are you not telling us? Are you allowed to just use a matrix library and solve it in a few lines, or is this a full DIY homework?
1
2
3
4
5
6
if (a == 0 and b == 0)
    "infinite solutions"
else if (a == 0 /*and b != 0*/)
    "no solution"
else
    x = -b / a
Last edited on
or that. ^^ I read that to be a is a matrix out of habit... sorry!
Topic archived. No new replies allowed.