#include <stdio.h>
#include <math.h>
int main()
{
double a,b,c,x,D,x1,x2,p,p1,p2;
scanf("%lf %lf %lf",&a
,&b
,&c
); if (a==0)//проверяем квадратное ли уравнение
{
printf("Equation is not square"); }
else
{
D=b*b-4*a*c;//дискриминант
if(D
<=0) printf("Discriminant is not positive"); else
{
x1
=(-b
+sqrt(D
))/(2*a
);//первый корень x2
=(-b
-sqrt(D
))/(2*a
);//второй корень p1=a*x1*x1+b*x1+c;//погрешность при первом корне
p2=a*x2*x2+b*x2+c;//погрешности при втором корне
printf("Pogrejnost v slu4ai x1 %le\n",p1
); printf("Pogrejnost v slu4ai x2 %le\n",p2
); }
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxtYXRoLmg+CiAKaW50IG1haW4oKSAKewoKCWRvdWJsZSBhLGIsYyx4LEQseDEseDIscCxwMSxwMjsKCXNjYW5mKCIlbGYgJWxmICVsZiIsJmEsJmIsJmMpOwoJaWYgKGE9PTApLy/Qv9GA0L7QstC10YDRj9C10Lwg0LrQstCw0LTRgNCw0YLQvdC+0LUg0LvQuCDRg9GA0LDQstC90LXQvdC40LUgCgkJewoJCQlwcmludGYoIkVxdWF0aW9uIGlzIG5vdCBzcXVhcmUiKTsKCQl9CgllbHNlIAoJewoJCUQ9YipiLTQqYSpjOy8v0LTQuNGB0LrRgNC40LzQuNC90LDQvdGCCgkJaWYoRDw9MCkgcHJpbnRmKCJEaXNjcmltaW5hbnQgaXMgbm90IHBvc2l0aXZlIik7CgkJZWxzZQoJCXsKCQkJeDE9KC1iK3NxcnQoRCkpLygyKmEpOy8v0L/QtdGA0LLRi9C5INC60L7RgNC10L3RjAoJCQl4Mj0oLWItc3FydChEKSkvKDIqYSk7Ly/QstGC0L7RgNC+0Lkg0LrQvtGA0LXQvdGMCgkJCXByaW50ZiAoIngxICAlMC41bGZcbiIseDEpOwoJCQlwcmludGYgKCJ4MiAgJTAuNWxmXG4iLHgyKTsKCQkJcDE9YSp4MSp4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