float fun(float x,float a,float b,float c){float temp;temp = b*b - 4*a*c;if (a==0||temp<0){cout<<"ERROR"cout<return 0;}else return (-b+sqrt(temp))/(2*a);}//只返回值较大的根
x=(-b+或-根号下b^2-4ac)/2a