Our assignment was in the C programming language, and we were to find the root of a quadratic function, Ax

^{2}+ Bx + C = 0, and thier corresponding slopes. The program is supposed to terminate when 'A', 'B' and 'C' equals zero, but instead it terminates at just 'A' = 0.

This is my code:

#include

#include

float flt_a;

float flt_b;

float flt_c;

int int_x1;

int int_x2;

int int_m1;

int int_m2;

int int_root;

void main ()

{

do

{

printf("For formula reading Ax^2 + Bx + C = 0,n");

printf("n");

printf("Enter first coefficent, A:n");

scanf("%f", & flt_a);

printf("n");

printf("Enter first coefficent, B:n");

scanf("%f", & flt_b);

printf("n");

printf("Enter first coefficent, C:n");

scanf("%f", & flt_c);

printf("n");

if (flt_a != 0.0 || flt_b != 0.0 || flt_c != 0.0)

{

if (flt_b * flt_b - 4 * flt_a * flt_c < 0.0)

{

int_root = 0;

}

else

{

int_root = 2;

int_x1=(-flt_b + sqrt((flt_b * flt_b)- 4*flt_a*flt_c))/(2*flt_a);

int_x2=(-flt_b - sqrt((flt_b * flt_b)- 4*flt_a*flt_c))/(2*flt_a);

int_m1= 2 * flt_a * int_x1 + flt_b;

int_m2= 2 * flt_a * int_x2 + flt_b;

}

}

else

{

if (flt_a == 0)

{

int_root= 1;

int_x1=(-flt_c / flt_b);

int_m1= flt_b;

}

else

{

int_root= 0;

}

}

}

while (flt_a != 0.0 || flt_b != 0.0 || flt_c != 0.0);

printf("n");

printf("n");

printf("Program terminated:n");

printf("n");

}

What am I missing, cuz it complied perfectly?