# include<stdio.h>
# include<math.h>
int main () {
float a,b,c,r1,r2,d;
printf ("Enter the values of a b c: "); scanf (" %f %f %f", &a
, &b
, &c
);
d= b*b - 4*a*c;
if (d>0) {
r1
= -b
+sqrt (d
) / (2*a
); r2
= -b
-sqrt (d
) / (2*a
); printf ("The real roots = %f %f", r1
, r2
); }
else if (d==0) {
r1 = -b/(2*a);
r2 = -b/(2*a);
printf ("Roots are equal =%f %f", r1
, r2
); }
else
printf("Roots are imaginary");
return 0;
}
IyBpbmNsdWRlPHN0ZGlvLmg+CiMgaW5jbHVkZTxtYXRoLmg+CgppbnQgbWFpbiAoKSB7CiAgICBmbG9hdCBhLGIsYyxyMSxyMixkOwogICAgCiAgICBwcmludGYgKCJFbnRlciB0aGUgdmFsdWVzIG9mIGEgYiBjOiAiKTsKICAgIHNjYW5mICgiICVmICVmICVmIiwgJmEsICZiLCAmYyk7CiAgICAKICAgIGQ9IGIqYiAtIDQqYSpjOwogICAgCiAgICBpZiAoZD4wKSB7CiAgICAgICAgcjEgPSAtYitzcXJ0IChkKSAvICgyKmEpOwogICAgICAgIHIyID0gLWItc3FydCAoZCkgLyAoMiphKTsKICAgICAgICBwcmludGYgKCJUaGUgcmVhbCByb290cyA9ICVmICVmIiwgcjEsIHIyKTsKICAgIH0KICAgIGVsc2UgaWYgKGQ9PTApIHsKICAgICAgICByMSA9IC1iLygyKmEpOwogICAgICAgIHIyID0gLWIvKDIqYSk7CiAgICAgICAgcHJpbnRmICgiUm9vdHMgYXJlIGVxdWFsID0lZiAlZiIsIHIxLCByMik7CiAgICB9CiAgICBlbHNlCiAgICAgICAgcHJpbnRmKCJSb290cyBhcmUgaW1hZ2luYXJ5Iik7CiAgICAKICAgIHJldHVybiAwOwp9