You are on page 1of 1

#include<conio.

h>
#include<stdio.h>
#include<math.h>
float x1(float u,float v, float w);
float x2(float u,float v, float w);
main()
{
float u,v,w;
printf("Sabiendo que el polinomio es de la forma ax^2+bx+c");
printf("\n\n Ingresar a:");
scanf("%f",&u);
printf(" Ingresar b:");
scanf("%f",&v);
printf(" Ingresar c:");
scanf("%f",&w);
printf("\n El Polinomio es %fx^2+(%fx)+(%f)",u,v,w);
printf("\n Sus raices son %f y %f",x1(u,v,w),x2(u,v,w));
getch();
}

float x1(float a,float b, float c)


{
return((-b+sqrt(b*b-4*a*c))/(2*a));
}

float x2(float a,float b, float c)


{
return((-b-sqrt(b*b-4*a*c))/(2*a));
}

You might also like