Program to print the quadratic equation


#include<stdio.h>
#include<conio.h>
#include<math.h>

main()
{
float a,b,c,d,k,x,y;
clrscr();
printf("Enetr the values of a,b,c=>");
scanf("%f %f %f",&a,&b,&c);
d=((b*b)-(4*a*c));
k=sqrt(d);
x= (-b+k)/(2*a);
y= (-b-k)/(2*a);
printf("The quadratic equation is x=%f and y=%f",x,y);
getch();
}

Comments

Popular posts from this blog

Customize User's Profile in ASP.NET Identity System

Lambda two tables and three tables inner join code samples