Quadratic eqn - one test case always falling

#include
#include
using namespace std;
int main() {
float a,b,c;

cin>>a>>b>>c;
float cf = (bb)- (4a*c);

if(cf>0){
cout<<“real and distinct”<<endl;
float r1 = (-b - (sqrt(cf)))/(2a);
float r2 = (-b + (sqrt(cf)))/(2
a);
cout<<r1<<" "<<r2;
}
else if(cf==0){
cout<<“real and equal”<<endl;
float r = (-b)/(2*a);
cout<<r;
}
else{
cout<<“imaginary”;
}
return 0;
}

@aryanv
Share your code using ide.codingblocks.com please.

how do i do that? through the share button?

@aryanv
Save your code on ide.codingblocks.com and share the URL here.


i think this is the link

@aryanv

  1. Use int instead of float in your program.
  2. In case when the roots are equal , you have to print the roots twice instead of just once , even though they are equal.
    cout << r << " " << r;
  3. Stick to the specified output format. Capitalisation matters.
    Print “Real and Equal” instead of "real and equal ".
    Make other capitalisation changes for your output as well as given in the Sample Output.

ok it worked now , thank you .