#include<math.h>
#include<stdio.h>
int main()
{
float a, b, c,d,e;
printf("Input parameters for the equation:\n");
scanf("%f %f %f", &a, &b, &c);
printf("The Equation: %fx^2+%fx+%f=0\n", a, b, c);
d = pow(b,2);
e = 4 * a*c;
if (d == e)
{
float root;
root = -b / (2 * a);
printf("Two same roots: %f\n",root );
}
if (d > e)
{
float root1, root2;
root1 = (-b + sqrt(d - e)) / (2 * a);
root2 = (-b - sqrt(d - e)) / (2 * a);
printf("Two different roots: %f %f\n", root1,root2);
}
if (d < e)
printf("No Invalid Root!\n");
return 0;
}