求一元二次方程的根的问题
elseif(d >= 0){
printf("x1 = %0.2f\n", ( -b + sqrt(d)) / (2 * a));
printf("x2 = %0.2f\n", ( -b - sqrt(d)) / (2 * a));
}
else{
printf("x1 = %0.2f + %0.2fi\n", -b / (2 * a), sqrt(-d) / (2 * a));
printf("x2 = %0.2f - %0.2fi\n", -b / (2 * a), sqrt(-d) / (2 * a));
} 这里的花括号去掉为什么出错