Please tell where am I wrong?
Ques is to print roots and their nature in a series with given constraints. where am i wrong?
i have sent it multiple times but got no reply
#include using namespace std; #include #include <math.h> int main() { int a,b,c; int det1,det2; cin>>a>>b>>c; if(a,b,c>= -100 && a,b,c <= 100){ det1 = (-b + sqrt(pow(b,2) - 4ac))/2a; det2 = (-b - sqrt(pow(b,2) - 4ac))/2a ; if(det1==det2){ cout<<“Real and Equal”<<det1; } else if (det1 > det2) { cout<<“Real and Distinct”<<endl; cout<< det2<<" " << det1<<endl ;} else if (det2>det1){ cout<<“Real and Distinct”<<endl; cout<< det1 <<" " << det2 <<endl ; } else{cout<<“Imaginary”;} } }
@akshat1409, hope the doubt is clear you can use ide.codingblocks.com for saving your code and just give the link as code here is not readable
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.
