#include "stdafx.h"
#include <math.h>
#include <stdio.h>
int main (void)
{
float a,b,c,disc,p,q;
printf("please enter the coefficients a,b,c:");
scanf("%f,%f,%f,&a,&b,&c);
disc=b*b-4*a*c;
p=-b/(2*a);
q=sqrtf(disc)/(2*a);
printf("x1=%7.4f,x2=%7.4f\n",p+q,p-q);
return 0;
}
加黑提示语法错误