#include<iostream.h> void main() { int a,b,c; cout<<"请输入一元二次方程各个系数a,b,c"<<endl; cin>>a>>b>>c; if(b*b-4*a*c==0) cout<<"其解只有一个数即"<<-b/(2*a)<<endl;// else if(b*b-4*a*c<0) cout<<"此方程无解"<<endl; else cout<<"其解有两个数分别为"<<(-b+sqrt(b*b-4*a*c))/(2*a)<<(-b-sqrt(b*b-4*a*c))/(2*a)<<endl; }