bhaskara's formula in c
#include <stdio.h>
#include <math.h>
int main()
{
double a, b, c, r1, r2;
scanf("%lf %lf %lf", &a, &b, &c);
r1 = (-b + sqrt(pow(b, 2) - (4 * a * c))) / (2 * a);
r2 = (-b - sqrt(pow(b, 2) - (4 * a * c))) / (2 * a);
if ((int)a == 0 || b < c)
{
printf("impossible to calculate\n");
}
else
{
printf("R1 = %0.5lf\n", r1);
printf("R2 = %0.5lf\n", r2);
}
return 0;
}