我这哪里错了。。。
输入:4 4 1 应该输出:-0.5,但是得不到这个答案
#include<iostream>
#include<cmath>
using namespace std;
int main()
{
double a,b,c,d,e,f,g;
cin>>a>>b>>c;
d=b*b-4*a*c;
e=pow(d,1/2);
f=(-b+e)/(2*a);
g=(-b-e)/(2*a);
if(d==0)
cout<<f<<endl;
if(d>0)
cout<<f<<g<<endl;
if(d<0)
cout<<"无解"<<endl;
return 0;
}