#include
#include<math.h>
using namespace std;
int main() {
int a,b,c;
float x,y,z;
cin>>a>>b>>c;
x= bb-4ac;
if (x>0)
{
cout<<“Real and Distinct”<<endl;
y= ((-b)+ sqrt(x))/2a;z= ((-b)- sqrt(x))/2a;
cout<< y << " "<< z;
}
else if (x==0)
{
cout<<“Real and Equal”<<endl;
y= (-b)/2a;
cout<< y << " " << y;
}
else if (x<0)
{
cout<<“Imaginary”<<endl;
}
return 0;
}
The result of testcase 1 : 1 1 1 is coming wrong when i submit the code. Although it works when i put the input on my own. why isn't this getting submitted?
shrishty u have done too many syntax error i am posting a corrected code just check out the mistakes
ur logic is right
Why isn’t my code getting submitted on coding blocks platform if the logic and everything is right. I downloaded all the testcases and checked they all run well on codeblocks IDE . Any suggestions on that?
check ur code u have done syntax error i.e writting code
like u have done bb - 4ac instead u have to do bb- 4a*c
also u have write cout in wrong quotes
thats why ur code is not submitting
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.