I am a beginner on C programming and an error message (underlined) that I have typed on the below program is not working....can anyone help please???
I am solving a quadratic equation the -b +/- root(b*b-4ac)/2a. If b*b is less than 4ac then there are no real roots so I need an error message. So i have made the bracket (f) and said that if it is less than zero the error message should come up....but its not! Any help would be grateful!!!

#include <stdio.h>
#include <math.h>
int main() {
float a, b ,c, d, e, f, root, x1,x2, b2;
printf("Enter a: ");
scanf("%f",&a);
printf("Enter b: ");
scanf("%f",&b);
printf("Enter c: ");
scanf("%f",&c);
b2 = pow(b,2);
d = (4*a*c);
f = (b2-d);
if(f<0) {
printf("Error - no real roots!\n"); /*Error messaging*/
return 0;
} root = sqrt(f);
e = root/(2*a);
x1 = ((-b)+e);
x2 = ((-b)-e);
printf("Solution=%f\n",x1);
printf("Solution=%f\n",x2);
return 0;
}