以下是为求整系数方程“ax2 + bx + c = 0”的实数根的程序,补充程序使其完整。 #include
#include ________ int main ( ) { int a, b, c; float d,x1, x2; scanf ( "%d%d%d", &a, &b, &c ); d = b * b - 4.0 * a * c; switch ( 1* ( d > 0 ) + 2 * ( d == 0 ) ) { case ___: printf( "x1 = x2 = %f\n", -b / ( 2 .0 * a ) ); ______; case ___: x1 = ( - b + sqrt (d ) ) / ( 2.0 * a ); x2 = ( - b – sqrt (d ) ) / ( 2.0 * a ); printf ( "x1 = %f, x2 = %f\n", x1, x2 ); ______; case _0__: printf (__”无实根”_____________); } return 0; }