Break it down into pieces. As I start, try writing a function that takes the values of a, b, and c, and prints one line of the output. Have your main program test it out:
1 2 3 4 5 6 7 8 9 10 11
void solveQuadratic(double a, double b, double c)
{
// compute the roots (if they exist) then print one line of the out
// i.e., print a b c root1 root2
}
int main(int argc, char **argv)
{
solveQuadratic(1,2,3);
solveQuadratic(-1, -2, 3);
}
Verify by hand that you're getting the right answers. Next change main() to produce the table required, complete with headings.