#include<stdio.h>
#include<math.h>
#include<conio.h>
float FGen1(void);
float FGen2(void);
int main()
{
float x1,y2;
x1=FGen1();
y2=FGen2();
printf("FGen1=%f \n",x1);
printf("FGen2=%f \n",y2);
getch();
}
float FGen1(void)
{
float a,b,c,x1;
printf("Introduce valores (a,b,c)...\n");
scanf("%f,%f,%f",&a, &b, &c);
x1=(-b+sqrt(pow(b,2)-(4*a*c)))/(2*a);
return x1;
}
float FGen2(void)
{
float a,b,c,x2;
x2=(-b-sqrt(pow(b,2)-(4*a*c)))/(2*a);
return x2;
}
No hay comentarios:
Publicar un comentario