Revising Quadratic

https://hack.codingblocks.com/practice/p/384/50

one test case is failing (last one)

#include
#include
using namespace std;
int main() {
int a,b,c;
cin>>a>>b>>c;
float k;
k=(bb-4ac);
float l=sqrt(k);
if(k<0){
cout<<“Imaginary”;
}
if(k==0){
cout<<“Real and Equal”<<endl;
float z=(-(b/(2
a)));
cout<<z<<" “<<z;
}
else{
cout<<“Real and Distinct”<<endl;
int zz=((-b-l)/(2a));
int zz1=((-b+l)/(2
a));
cout<<zz<<” "<<zz1;

}
return 0;

}

Hey Harshita, can you copy your code on ide , save the code and share that link because the code you have copied here is very ambiguous as in this linek=(bb-4ac); it should be k=(b*b-4*a*c);
One more thing is in this problem you are supposed to print the roots in sorted order.

solution -
https://ide.codingblocks.com/s/45302

You have to print zz first then zz1 in the else case.
Made the changes you can see here : https://ide.codingblocks.com/s/45323