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