can someone help me how to format my code so it doens all come up like this with no spaces and tabs? i use blogger. thank you!
if (d > 0)
{
/* results are real numbers */
q = pow (d, 1./2);
x1 = (-b + q)/(2*a);
x2 = (-b - q)/(2*a);
printf ("X1=%f X2=%f\n", x1, x2);
}
else if (d == 0)
{
/* theres only one result */
x1 = -b/(2*a);
printf ("X1=X2=%f\n", x1);
}
else
{
/* results are conjugated complex numbers */
q = pow(-d, 1./2);
x1r = -b/(2*a) ;
x2r = x1r;
x1i = q/(2*a);
x2i = -x1i;
printf ("X1 = (%f,%f)\n", x1r, x1i);
printf ("X2 = (%f,%f)\n", x2r, x2i);
}
}
--------------------------------------------------------------
http://www.visualcmaniac.com