#include<math.h> main(){ printf("请输入a,b,c的值:\n"); double a,b,c; scanf("%lf,%lf,%lf",&a,&b,&c); double result =(-b+sqrt(b*b-4*a*c))/2*a; double result2=(-b-sqrt(b*b-4*a*c))/2*a; printf("%lf,%lf",&result,&result2); }