Input coefficients of x^3 + ax^2 + bx + c? -2 -1 2 The three solutions are 1, -1 and 2
Warning: The equations in the book may not be correct. Continue on with the lab, anyway.
Make sure the answers are correct when you give it good input. Make sure the program gives an appropriate result on bad input. Also, test your testing routine (the part that plugs values back into the polynomial). You can do this either by introducing a bug into your program. But a much better way is to set a breakpoint in gdb and change one of the solutions a bit using
set var = value