#include
using namespace std;
int main()
{
int a,b,c,d,x1,x2,n;
cin>>a>>b>>c;
if(a>=-100 and a!=0)
{
if(b<=100 and c<=100)
{
d= bb-4(ac);
if(d>0)
{
cout<<“Real and distinct roots”<<endl;
for(n=0;nn<=d;n++)
x1=(-b-n)/(2a);
x2=(-b+n)/(2a);
cout<<x1<<" “<<x2;
}
else if(d==0)
{
cout<<“Real and equal roots”<<endl;
x1=x2=(-b)/(2*a);
cout<<x1<<” "<<x2;
}
else
cout<<“Roots are imaginary”;
}
else
cout<<“enter values of b and c within limit”;
}
else
cout<<“enter correct value of a”;
return 0;
}
this is my solution. the sample test case is passed successfully but while submitting it is showing wrong answer for the three test cases. I am not able to understand what am I missing in the solution.kindly help.