Hello sir
I have doubt
#include
#include
using namespace std;
int main()
{
int a,b,c;
float r1,r2,d,D;
cout<<“Enter the values of a,b and c”;
cin>>a>>b>>c;
D=(bb-4ac);
d=2a;
r1=(-b+sqrt(D))/d;
r2=(-b-sqrt(D))/d;
if(D>0)
{
r1=(-b+sqrt(D))/d;
r2=(-b-sqrt(D))/d;
cout<<“The roots are real and different”<<endl;
if(r1>r2)
{
cout<<r1<<endl;
}
else cout<<r2;
}
else if(D==0)
{
r1=-b/d;
r2=-b/d;
cout<<"The roots are real and same"<<r1<<endl<<r2<<endl;
}
else if (D<0)
{cout<<"The roots are imaginary";}
}